Class: RubyApp::Elements::Base::BasePage
- Inherits:
-
RubyApp::Element
- Object
- RubyApp::Element
- RubyApp::Elements::Base::BasePage
- Includes:
- Mixins::HashMixin
- Defined in:
- lib/ruby_app/elements/base/base_page.rb
Direct Known Subclasses
Defined Under Namespace
Classes: LoadedEvent, TriggeredEvent
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
Attributes inherited from RubyApp::Element
Instance Method Summary collapse
- #[](key) ⇒ Object
- #[]=(key, value) ⇒ Object
-
#initialize ⇒ BasePage
constructor
A new instance of BasePage.
- #interval ⇒ Object
- #interval=(value) ⇒ Object
Methods included from Mixins::HashMixin
Methods inherited from RubyApp::Element
#element_id, get_content_type, get_element
Methods included from Mixins::ConfigurationMixin
Methods included from Mixins::TranslateMixin
Methods included from Mixins::TemplateMixin
#exclude_parent_template, #exclude_parent_template?, #get_template, #get_templates, #template_name, #template_path
Methods included from Mixins::RenderMixin
#content_for, #render, #rendered?, #templates
Constructor Details
#initialize ⇒ BasePage
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
#data ⇒ Object (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 |
#interval ⇒ Object
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 |