Class: Oga::XPath::Context

Inherits:
Object
  • Object
show all
Defined in:
lib/oga/xpath/context.rb

Overview

Class used as the context for compiled XPath Procs.

The binding of this class is used for the binding of Procs compiled by Compiler. Not using a specific binding would result in the procs using the binding of Oga::XPath::Compiler#compile, which could lead to race conditions.

Instance Method Summary collapse

Instance Method Details

#evaluate(string) ⇒ Proc

Parameters:

  • string (String)

Returns:

  • (Proc)


12
13
14
# File 'lib/oga/xpath/context.rb', line 12

def evaluate(string)
  binding.eval(string)
end