Class: RubyApp::Element
- Inherits:
-
Object
- Object
- RubyApp::Element
- Extended by:
- Haml::Helpers, Mixins::ConfigurationMixin, Mixins::RenderMixin, Mixins::TemplateMixin, Mixins::TranslateMixin
- Includes:
- Haml::Helpers, Mixins::ConfigurationMixin, Mixins::RenderMixin, Mixins::TranslateMixin
- Defined in:
- lib/ruby_app/element.rb
Direct Known Subclasses
RubyApp::Elements::Mobile::Calendars::Month, RubyApp::Elements::Mobile::Click, RubyApp::Elements::Mobile::Document, RubyApp::Elements::Mobile::Hash, RubyApp::Elements::Mobile::Input, RubyApp::Elements::Mobile::List, RubyApp::Elements::Mobile::List::ListItem, RubyApp::Elements::Mobile::Page
Defined Under Namespace
Classes: AssertedEvent, Event, ExceptionEvent, ExecutedEvent, MessagedEvent, TriggeredEvent, UpdatedEvent
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
Class Method Summary collapse
Instance Method Summary collapse
- #element_id ⇒ Object
-
#initialize ⇒ Element
constructor
A new instance of Element.
Methods included from Mixins::ConfigurationMixin
Methods included from Mixins::TranslateMixin
Methods included from Mixins::TemplateMixin
exclude_parent_template, exclude_parent_template?, get_cache, get_default_template, get_template, get_template_name, get_templates, template_path
Methods included from Mixins::RenderMixin
content_for, get_cache, get_default_template, get_templates, render
Constructor Details
#initialize ⇒ Element
Returns a new instance of Element.
296 297 298 |
# File 'lib/ruby_app/element.rb', line 296 def initialize @attributes = {'id' => self.element_id} end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
288 289 290 |
# File 'lib/ruby_app/element.rb', line 288 def attributes @attributes end |
Class Method Details
.get_element(element_id) ⇒ Object
304 305 306 307 |
# File 'lib/ruby_app/element.rb', line 304 def self.get_element(element_id) element_id =~ /(-?\d+)/ return ObjectSpace._id2ref($1.to_i) end |
Instance Method Details
#element_id ⇒ Object
300 301 302 |
# File 'lib/ruby_app/element.rb', line 300 def element_id return "id_#{object_id}" end |