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