Class: KirguduBase::DynamicPages::Event

Inherits:
Element
  • Object
show all
Defined in:
app/models/kirgudu_base/dynamic_pages/event.rb

Instance Attribute Summary collapse

Attributes inherited from Element

#parent_entry

Instance Method Summary collapse

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

#fix_parent_entry

Methods included from Models::MergeableElements::InstanceMethods

#merge

Constructor Details

#initialize(options = {}) ⇒ Event

Returns a new instance of Event.



11
12
13
14
15
16
# File 'app/models/kirgudu_base/dynamic_pages/event.rb', line 11

def initialize(options = {})
	self.name = nil
	self.actions = nil

	super(options)
end

Instance Attribute Details

#actionsObject

Returns the value of attribute actions.



19
20
21
# File 'app/models/kirgudu_base/dynamic_pages/event.rb', line 19

def actions
  @actions
end

#nameObject

Returns the value of attribute name.



18
19
20
# File 'app/models/kirgudu_base/dynamic_pages/event.rb', line 18

def name
  @name
end

Instance Method Details

#to_external_hash(options = {}) ⇒ Object



21
22
23
24
25
26
27
28
# File 'app/models/kirgudu_base/dynamic_pages/event.rb', line 21

def to_external_hash(options = {})
	options ||= {}
	options.merge!({
		               name: self.name,
		               actions: self.actions.map{ |a| a.to_external_hash(nil) }
	               })
	super(options)
end