Class: REXML::XPathNode
Instance Attribute Summary collapse
-
#context ⇒ Object
readonly
Returns the value of attribute context.
-
#raw_node ⇒ Object
readonly
Returns the value of attribute raw_node.
Instance Method Summary collapse
-
#initialize(node, context = nil) ⇒ XPathNode
constructor
A new instance of XPathNode.
- #position ⇒ Object
Constructor Details
#initialize(node, context = nil) ⇒ XPathNode
Returns a new instance of XPathNode.
919 920 921 922 923 924 925 926 |
# File 'lib/rexml/xpath_parser.rb', line 919 def initialize(node, context=nil) if node.is_a?(XPathNode) @raw_node = node.raw_node else @raw_node = node end @context = context || {} end |
Instance Attribute Details
#context ⇒ Object (readonly)
Returns the value of attribute context.
918 919 920 |
# File 'lib/rexml/xpath_parser.rb', line 918 def context @context end |
#raw_node ⇒ Object (readonly)
Returns the value of attribute raw_node.
918 919 920 |
# File 'lib/rexml/xpath_parser.rb', line 918 def raw_node @raw_node end |
Instance Method Details
#position ⇒ Object
928 929 930 |
# File 'lib/rexml/xpath_parser.rb', line 928 def position @context[:position] end |