Class: Hyalite::DOM::Element::Attributes
- Defined in:
- lib/hyalite/dom/element.rb
Instance Method Summary collapse
- #[](name) ⇒ Object
- #[]=(name, value) ⇒ Object
-
#initialize(element) ⇒ Attributes
constructor
A new instance of Attributes.
- #remove(name) ⇒ Object
Constructor Details
#initialize(element) ⇒ Attributes
Returns a new instance of Attributes.
102 103 104 |
# File 'lib/hyalite/dom/element.rb', line 102 def initialize(element) @element = element end |
Instance Method Details
#[](name) ⇒ Object
106 107 108 |
# File 'lib/hyalite/dom/element.rb', line 106 def [](name) @element.get_attribute(name) end |
#[]=(name, value) ⇒ Object
110 111 112 |
# File 'lib/hyalite/dom/element.rb', line 110 def []=(name, value) @element.set_attribute(name, value) end |
#remove(name) ⇒ Object
114 115 116 |
# File 'lib/hyalite/dom/element.rb', line 114 def remove(name) @element.remove_attribute(name) end |