class XPath::XPathNodeSet::LocationStep

Public Class Methods

new(context) click to toggle source
# File lib/xml/xpath.rb, line 2713
def initialize(context)
  @context = context
  @visitor = context.visitor
  @nodes = []
end

Public Instance Methods

reuse(node) click to toggle source
# File lib/xml/xpath.rb, line 2723
def reuse(node)
  @node = node
  @nodes.clear
end
select() { |i| ... } click to toggle source
# File lib/xml/xpath.rb, line 2728
def select
  @iterator.each(@node, @visitor) { |i|
    node = i.node
    @nodes.push node if yield(i)
  }
  self
end
select_all() click to toggle source
# File lib/xml/xpath.rb, line 2736
def select_all
  @iterator.each(@node, @visitor) { |i| @nodes.push i.node }
  self
end
set_iterator(iterator) click to toggle source
# File lib/xml/xpath.rb, line 2719
def set_iterator(iterator)
  @iterator = iterator
end