Class: Oga::XML::Element

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

Instance Method Summary collapse

Instance Method Details

#rpath(&block) ⇒ Object

Evaluates an RPath expression on the element

Examples:

RPath.use :oga
xml = Oga.parse_xml('<foo><bar baz="qux"/></foo>')
xml.children.first.rpath { bar['baz'] } # => "qux"

Returns:

  • (Object)

See Also:

  • #RPath


76
77
78
# File 'lib/rpath/adapters/oga.rb', line 76

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