Class: KirguduBase::DynamicPages::Entry

Inherits:
PageElement show all
Defined in:
app/models/kirgudu_base/dynamic_pages/entry.rb

Instance Attribute Summary collapse

Attributes inherited from PageElement

#enabled, #html_options, #id, #name, #use_i18n, #visible

Attributes inherited from Element

#parent_entry

Instance Method Summary collapse

Methods inherited from PageElement

#i18n_data_as_string, #to_external_hash

Methods inherited from Element

#as_json, #fix_parent_entry, #kontroller_klass, #to_external_hash

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

#fix_parent_entry

Constructor Details

#initialize(options = {}) ⇒ Entry

Returns a new instance of Entry.



13
14
15
16
17
18
19
20
# File 'app/models/kirgudu_base/dynamic_pages/entry.rb', line 13

def initialize(options = {})
	self.is_ajax = nil
	self.properties = nil
	self.parent = nil
	self.http_method = nil

	super(options)
end

Instance Attribute Details

#http_methodObject

Returns the value of attribute http_method.



22
23
24
# File 'app/models/kirgudu_base/dynamic_pages/entry.rb', line 22

def http_method
  @http_method
end

#is_ajaxObject

Returns the value of attribute is_ajax.



23
24
25
# File 'app/models/kirgudu_base/dynamic_pages/entry.rb', line 23

def is_ajax
  @is_ajax
end

#parentObject

Returns the value of attribute parent.



25
26
27
# File 'app/models/kirgudu_base/dynamic_pages/entry.rb', line 25

def parent
  @parent
end

#propertiesObject

Returns the value of attribute properties.



24
25
26
# File 'app/models/kirgudu_base/dynamic_pages/entry.rb', line 24

def properties
  @properties
end

Instance Method Details

#merge(source_element) ⇒ Object



28
29
30
31
32
33
34
35
# File 'app/models/kirgudu_base/dynamic_pages/entry.rb', line 28

def merge(source_element)
	#self.properties do |element|
	#	element.merge(source_element.properties)
	#end if self.properties && source_element.properties

	self.parent ||= source_entry.parent
	self.http_method
end