Class: XML::Node::REXMLCompat::Elements

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

Instance Method Summary collapse

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