Class: Gammo::XPath::AST::Axis::Parent

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



178
179
180
181
182
# File 'lib/gammo/xpath/ast/axis.rb', line 178

def strain(context, context_node, node_set)
  context_node = context_node.instance_of?(Gammo::Attribute) ?
    context_node.owner_element : context_node.parent
  node_set << context_node if node_test.match?(context_node)
end