Class: KirguduBase::DynamicPages::ParentElement
- Defined in:
- app/models/kirgudu_base/dynamic_pages/parent_element.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#source ⇒ Object
Returns the value of attribute source.
Attributes inherited from Element
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ ParentElement
constructor
A new instance of ParentElement.
- #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 = {}) ⇒ ParentElement
Returns a new instance of ParentElement.
12 13 14 15 16 |
# File 'app/models/kirgudu_base/dynamic_pages/parent_element.rb', line 12 def initialize( = {}) self.source = nil self.name = nil super() end |
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
20 21 22 |
# File 'app/models/kirgudu_base/dynamic_pages/parent_element.rb', line 20 def name @name end |
#source ⇒ Object
Returns the value of attribute source.
19 20 21 |
# File 'app/models/kirgudu_base/dynamic_pages/parent_element.rb', line 19 def source @source end |
Instance Method Details
#to_external_hash(options = {}) ⇒ Object
22 23 24 25 26 27 28 29 |
# File 'app/models/kirgudu_base/dynamic_pages/parent_element.rb', line 22 def to_external_hash( = {}) ||= {} .merge!({ source: self.url, name: self.name }) super() end |