Class: XPath::XPathProc

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(proc, source) ⇒ XPathProc

Returns a new instance of XPathProc.



480
481
482
483
# File 'lib/xml/xpath.rb', line 480

def initialize(proc, source)
  @proc = proc
  @source = source
end

Instance Attribute Details

#sourceObject (readonly)

Returns the value of attribute source.



485
486
487
# File 'lib/xml/xpath.rb', line 485

def source
  @source
end

Instance Method Details

#call(context) ⇒ Object



487
488
489
# File 'lib/xml/xpath.rb', line 487

def call(context)
  @proc.call context
end