Class: 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.
Attributes inherited from Element
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ EventAction
constructor
A new instance of EventAction.
- #to_external_hash(options = {}) ⇒ Object
Methods inherited from Element
#as_json, #fix_parent_entry, #kontroller_klass
Methods included from Models::MergeableElements::ClassMethods
#get_mergeable_attributes, #mergeable_attributes
Methods included from Models::FixableElements::ClassMethods
#fixable_attributes, #get_kb_fixable_attributes
Methods included from Models::FixableElements::InstanceMethods
Methods included from Models::MergeableElements::InstanceMethods
Constructor Details
#initialize(options = {}) ⇒ EventAction
Returns a new instance of EventAction.
13 14 15 16 17 18 19 20 21 |
# File 'app/models/kirgudu_base/dynamic_pages/event_action.rb', line 13 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.
25 26 27 |
# File 'app/models/kirgudu_base/dynamic_pages/event_action.rb', line 25 def constraint @constraint end |
#data_source ⇒ Object
Returns the value of attribute data_source.
26 27 28 |
# File 'app/models/kirgudu_base/dynamic_pages/event_action.rb', line 26 def data_source @data_source end |
#description ⇒ Object
Returns the value of attribute description.
28 29 30 |
# File 'app/models/kirgudu_base/dynamic_pages/event_action.rb', line 28 def description @description end |
#name ⇒ Object
Returns the value of attribute name.
24 25 26 |
# File 'app/models/kirgudu_base/dynamic_pages/event_action.rb', line 24 def name @name end |
#target ⇒ Object
Returns the value of attribute target.
27 28 29 |
# File 'app/models/kirgudu_base/dynamic_pages/event_action.rb', line 27 def target @target end |
Instance Method Details
#to_external_hash(options = {}) ⇒ Object
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
# File 'app/models/kirgudu_base/dynamic_pages/event_action.rb', line 31 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 |