class Reactor::Plans::CreateAttribute
Public Class Methods
new(*args)
click to toggle source
Calls superclass method
Reactor::Plans::CommonAttribute::new
# File lib/reactor/plans/create_attribute.rb, line 6 def initialize(*args) super() (name, type), options = separate_arguments(*args) @name = name || options[:name] @type = type || options[:type] # Default values for attributes: # isSearchableInCM: false # isSearchableInTE: false set(:isSearchableInCM, 0) set(:isSearchableInTE, 0) end
Public Instance Methods
migrate!()
click to toggle source
# File lib/reactor/plans/create_attribute.rb, line 25 def migrate! attrib = Reactor::Cm::Attribute.create(@name, @type) migrate_params!(attrib) end
prepare!()
click to toggle source
# File lib/reactor/plans/create_attribute.rb, line 18 def prepare! error("name ist nil") if @name.nil? error("type is nil") if @type.nil? # TODO: Type check prepare_params!(nil) end