Class: Reactor::Plans::CreateAttributeGroup
- Inherits:
-
CommonAttributeGroup
- Object
- CommonAttributeGroup
- Reactor::Plans::CreateAttributeGroup
- Defined in:
- lib/reactor/plans/create_attribute_group.rb
Constant Summary
Constants inherited from CommonAttributeGroup
Reactor::Plans::CommonAttributeGroup::ALLOWED_PARAMS
Instance Method Summary collapse
-
#initialize(*args) ⇒ CreateAttributeGroup
constructor
A new instance of CreateAttributeGroup.
- #migrate! ⇒ Object
- #prepare! ⇒ Object
Methods inherited from CommonAttributeGroup
#add_attributes, #remove_attributes, #set
Methods included from Prepared
Constructor Details
#initialize(*args) ⇒ CreateAttributeGroup
Returns a new instance of CreateAttributeGroup.
7 8 9 10 11 12 13 |
# File 'lib/reactor/plans/create_attribute_group.rb', line 7 def initialize(*args) super() (obj_class, name, index), = separate_arguments(*args) @name = name || [:name] @obj_class = obj_class || [:obj_class] @index = index || [:index] end |
Instance Method Details
#migrate! ⇒ Object
21 22 23 24 |
# File 'lib/reactor/plans/create_attribute_group.rb', line 21 def migrate! attrib = Reactor::Cm::AttributeGroup.create(@obj_class, @name, @index) migrate_params!(attrib) end |
#prepare! ⇒ Object
15 16 17 18 19 |
# File 'lib/reactor/plans/create_attribute_group.rb', line 15 def prepare! error("name ist nil") if @name.nil? error("obj_class is nil") if @obj_class.nil? prepare_params!(nil) end |