Class: REXML::Element

Inherits:
Object
  • Object
show all
Defined in:
lib/rpath/adapters/rexml.rb

Instance Method Summary collapse

Instance Method Details

#rpath(&block) ⇒ Object

Evaluates an expression on the element

Examples:

RPath.use :rexml
xml = REXML::Document.new('<foo bar="baz"/>')
xml.rpath { foo['bar'] } # => "baz"

Returns:

  • (Object)

See Also:

  • #RPath


57
58
59
# File 'lib/rpath/adapters/rexml.rb', line 57

def rpath(&block)
  RPath self, :rexml, &block
end