Class: KirguduBase::DynamicPages::EventAction
- Inherits:
-
Element
- Object
- Element
- KirguduBase::DynamicPages::EventAction
- Defined in:
- app/models/kirgudu_base/dynamic_pages/event_action.rb
Instance Attribute Summary collapse
-
#constraint ⇒ Object
Returns the value of attribute constraint.
-
#data_source ⇒ Object
Returns the value of attribute data_source.
-
#description ⇒ Object
Returns the value of attribute description.
-
#name ⇒ Object
Returns the value of attribute name.
-
#target ⇒ Object
Returns the value of attribute target.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ EventAction
constructor
A new instance of EventAction.
- #to_external_hash(options = {}) ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ EventAction
Returns a new instance of EventAction.
12 13 14 15 16 17 18 19 20 |
# File 'app/models/kirgudu_base/dynamic_pages/event_action.rb', line 12 def initialize( = {}) self.name = nil self.constraint = nil self.data_source = nil self.target = nil self.description = nil super() end |
Instance Attribute Details
#constraint ⇒ Object
Returns the value of attribute constraint.
24 25 26 |
# File 'app/models/kirgudu_base/dynamic_pages/event_action.rb', line 24 def constraint @constraint end |
#data_source ⇒ Object
Returns the value of attribute data_source.
25 26 27 |
# File 'app/models/kirgudu_base/dynamic_pages/event_action.rb', line 25 def data_source @data_source end |
#description ⇒ Object
Returns the value of attribute description.
27 28 29 |
# File 'app/models/kirgudu_base/dynamic_pages/event_action.rb', line 27 def description @description end |
#name ⇒ Object
Returns the value of attribute name.
23 24 25 |
# File 'app/models/kirgudu_base/dynamic_pages/event_action.rb', line 23 def name @name end |
#target ⇒ Object
Returns the value of attribute target.
26 27 28 |
# File 'app/models/kirgudu_base/dynamic_pages/event_action.rb', line 26 def target @target end |
Instance Method Details
#to_external_hash(options = {}) ⇒ Object
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
# File 'app/models/kirgudu_base/dynamic_pages/event_action.rb', line 30 def to_external_hash( = {}) ||= {} .merge!({ name: self.name, target: (self.target if self.target), constraint: ({ name: self.constraint.name, values: self.constraint.values } if self.constraint), data_source: (self.data_source.to_external_hash(nil) if self.data_source) }) [:constraint] = { name: self.constraint.name, values: self.constraint.values } if self.constraint super() end |