Class: RubyApp::Elements::Base::BasePage

Inherits:
RubyApp::Element show all
Includes:
Mixins::HashMixin
Defined in:
lib/ruby_app/elements/base/base_page.rb

Direct Known Subclasses

Page

Defined Under Namespace

Classes: LoadedEvent, TriggeredEvent

Instance Attribute Summary collapse

Attributes inherited from RubyApp::Element

#attributes

Instance Method Summary collapse

Methods included from Mixins::HashMixin

#method_missing

Methods inherited from RubyApp::Element

#element_id, get_element

Methods included from Mixins::ConfigurationMixin

#configuration

Methods included from Mixins::TranslateMixin

#localize, #translate

Methods included from Mixins::TemplateMixin

#exclude_parent_template, #exclude_parent_template?, #get_cache, #get_template, #get_templates, #template_name, #template_path

Methods included from Mixins::RenderMixin

#content_for, #render, #rendered?

Constructor Details

#initializeBasePage

Returns a new instance of BasePage.



41
42
43
44
# File 'lib/ruby_app/elements/base/base_page.rb', line 41

def initialize
  super
  @data = {}
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class RubyApp::Mixins::HashMixin

Instance Attribute Details

#dataObject (readonly)

Returns the value of attribute data.



36
37
38
# File 'lib/ruby_app/elements/base/base_page.rb', line 36

def data
  @data
end

Instance Method Details

#[](key) ⇒ Object



46
47
48
# File 'lib/ruby_app/elements/base/base_page.rb', line 46

def [](key)
  @data[key]
end

#[]=(key, value) ⇒ Object



50
51
52
# File 'lib/ruby_app/elements/base/base_page.rb', line 50

def []=(key, value)
  @data[key] = value
end

#intervalObject



54
55
56
# File 'lib/ruby_app/elements/base/base_page.rb', line 54

def interval
  return data[:interval]
end

#interval=(value) ⇒ Object



58
59
60
# File 'lib/ruby_app/elements/base/base_page.rb', line 58

def interval=(value)
  data[:interval] = value
end