Class: RubyApp::Element

Inherits:
Object
  • Object
show all
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

Defined Under Namespace

Classes: AssertedEvent, Event, ExceptionEvent, TriggeredEvent

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

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_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

#initializeElement

Returns a new instance of Element.



241
242
243
# File 'lib/ruby_app/element.rb', line 241

def initialize
  @attributes = {'id' => self.element_id}
end

Instance Attribute Details

#attributesObject (readonly)

Returns the value of attribute attributes.



235
236
237
# File 'lib/ruby_app/element.rb', line 235

def attributes
  @attributes
end

Class Method Details

.get_element(element_id) ⇒ Object



249
250
251
252
# File 'lib/ruby_app/element.rb', line 249

def self.get_element(element_id)
  element_id =~ /(-?\d+)/
  return ObjectSpace._id2ref($1.to_i)
end

Instance Method Details

#element_idObject



245
246
247
# File 'lib/ruby_app/element.rb', line 245

def element_id
  return "id_#{object_id}"
end