Class: Liquigen::Handlers::ChangeType
- Inherits:
-
Base
- Object
- Base
- Liquigen::Handlers::ChangeType
show all
- Defined in:
- lib/liquigen/handlers/change_type.rb
Instance Attribute Summary
Attributes inherited from Base
#id, #props, #sets, #table
Instance Method Summary
collapse
Methods inherited from Base
#process
Constructor Details
#initialize(props) ⇒ ChangeType
Returns a new instance of ChangeType.
5
6
7
8
9
|
# File 'lib/liquigen/handlers/change_type.rb', line 5
def initialize(props)
self.props = props
self.sets = []
self.id = build_id
end
|
Instance Method Details
#action_name ⇒ Object
11
12
13
|
# File 'lib/liquigen/handlers/change_type.rb', line 11
def action_name
'ChangeType'
end
|
#build_one_changeset(set) ⇒ Object
21
22
23
24
25
26
27
|
# File 'lib/liquigen/handlers/change_type.rb', line 21
def build_one_changeset(set)
props.each do |kv|
kv = kv.split(':')
change = Liquigen::ModifyDataType.new(kv[0], kv[1], kv[2])
set.changes << change
end
end
|
#file_suffix ⇒ Object
15
16
17
18
19
|
# File 'lib/liquigen/handlers/change_type.rb', line 15
def file_suffix
props.map do |item|
item.split(':')[0].camelize
end.uniq.join('And')
end
|