Class: Owrb::HTML::Element

Inherits:
Object
  • Object
show all
Defined in:
lib/owrb.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#attributesObject (readonly)

Returns the value of attribute attributes.



27
28
29
# File 'lib/owrb.rb', line 27

def attributes
  @attributes
end

#nameObject (readonly)

Returns the value of attribute name.



27
28
29
# File 'lib/owrb.rb', line 27

def name
  @name
end