Class: Owrb::HTML::Element
- Inherits:
-
Object
- Object
- Owrb::HTML::Element
- Defined in:
- lib/owrb.rb
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(element) ⇒ Element
constructor
A new instance of Element.
Constructor Details
#initialize(element) ⇒ Element
Returns a new instance of Element.
29 30 31 32 33 34 35 |
# File 'lib/owrb.rb', line 29 def initialize( element ) @name = element.name @attributes = {} element.attributes.each{|name, attribute| @attributes[ attribute.name ] = attribute.value } end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
27 28 29 |
# File 'lib/owrb.rb', line 27 def attributes @attributes end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
27 28 29 |
# File 'lib/owrb.rb', line 27 def name @name end |