class Gammo::XPath::AST::Axis::DescendantOrSelf

Public Instance Methods

strain(context, context_node, node_set) click to toggle source
# File lib/gammo/xpath/ast/axis.rb, line 122
def strain(context, context_node, node_set)
  node_set << context_node if node_test.match?(context_node)
  return if context_node.instance_of?(Gammo::Attribute)
  context_node.each_descendant do |node|
    node_set << node if node_test.match?(node)
  end
end