Class: XML::Node::REXMLCompat::Elements
- Inherits:
-
Object
- Object
- XML::Node::REXMLCompat::Elements
- Defined in:
- lib/libxml_rexml_compat.rb
Instance Method Summary collapse
- #[](key) ⇒ Object
- #each(&proc) ⇒ Object
-
#initialize(node) ⇒ Elements
constructor
A new instance of Elements.
Constructor Details
#initialize(node) ⇒ Elements
Returns a new instance of Elements.
23 24 25 |
# File 'lib/libxml_rexml_compat.rb', line 23 def initialize(node) @node = node end |
Instance Method Details
#[](key) ⇒ Object
27 28 29 |
# File 'lib/libxml_rexml_compat.rb', line 27 def [](key) @node.find_first(key) end |
#each(&proc) ⇒ Object
31 32 33 |
# File 'lib/libxml_rexml_compat.rb', line 31 def each(&proc) @node.each_child(&proc) end |