Method: REXML::XPathNode#initialize

Defined in:
lib/rexml/xpath_parser.rb

#initialize(node, context = nil) ⇒ XPathNode

Returns a new instance of XPathNode.



967
968
969
970
971
972
973
974
# File 'lib/rexml/xpath_parser.rb', line 967

def initialize(node, context=nil)
  if node.is_a?(XPathNode)
    @raw_node = node.raw_node
  else
    @raw_node = node
  end
  @context = context || {}
end