Class: Reactor::Plans::CommonAttributeGroup
- Inherits:
-
Object
- Object
- Reactor::Plans::CommonAttributeGroup
show all
- Includes:
- Prepared
- Defined in:
- lib/reactor/plans/common_attribute_group.rb
Constant Summary
collapse
- ALLOWED_PARAMS =
%i(title index).freeze
Instance Method Summary
collapse
Methods included from Prepared
#error, #separate_arguments
Constructor Details
Returns a new instance of CommonAttributeGroup.
8
9
10
|
# File 'lib/reactor/plans/common_attribute_group.rb', line 8
def initialize
@params = {}
end
|
Instance Method Details
#add_attributes(attributes) ⇒ Object
21
22
23
|
# File 'lib/reactor/plans/common_attribute_group.rb', line 21
def add_attributes(attributes)
@add_attributes = attributes
end
|
#migrate! ⇒ Object
29
30
31
|
# File 'lib/reactor/plans/common_attribute_group.rb', line 29
def migrate!
raise "#{self.class.name} did not implement migrate!"
end
|
#remove_attributes(attributes) ⇒ Object
25
26
27
|
# File 'lib/reactor/plans/common_attribute_group.rb', line 25
def remove_attributes(attributes)
@remove_attributes = attributes
end
|
#set(key, value) ⇒ Object
12
13
14
15
16
17
18
19
|
# File 'lib/reactor/plans/common_attribute_group.rb', line 12
def set(key, value)
key = key.to_sym
if key == :attributes
@attributes = value
else
@params[key.to_sym] = value
end
end
|