Class: Gammo::XPath::AST::Axis::Child

Inherits:
Gammo::XPath::AST::Axis
  • Object
show all
Defined in:
lib/gammo/xpath/ast/axis.rb

Constant Summary

Constants included from Subclassify

Subclassify::NotFoundError

Instance Method Summary collapse

Instance Method Details

#strain(context, context_node, node_set) ⇒ Object



98
99
100
101
102
103
104
105
# File 'lib/gammo/xpath/ast/axis.rb', line 98

def strain(context, context_node, node_set)
  return if context_node.instance_of?(Gammo::Attribute)
  node = context_node.first_child
  while node
    node_set << node if node_test.match?(node)
    node = node.next_sibling
  end
end