Class: Yoda::Typing::Context::TraceStore::ParserNodeWrapper
- Inherits:
-
Object
- Object
- Yoda::Typing::Context::TraceStore::ParserNodeWrapper
- Defined in:
- lib/yoda/typing/context.rb
Instance Attribute Summary collapse
- #node ⇒ ::Parser::AST::Node readonly
Instance Method Summary collapse
- #eql?(another) ⇒ Boolean
- #hash ⇒ Object
-
#initialize(node) ⇒ ParserNodeWrapper
constructor
A new instance of ParserNodeWrapper.
Constructor Details
#initialize(node) ⇒ ParserNodeWrapper
Returns a new instance of ParserNodeWrapper.
78 79 80 |
# File 'lib/yoda/typing/context.rb', line 78 def initialize(node) @node = node end |
Instance Attribute Details
#node ⇒ ::Parser::AST::Node (readonly)
75 76 77 |
# File 'lib/yoda/typing/context.rb', line 75 def node @node end |
Instance Method Details
#eql?(another) ⇒ Boolean
83 84 85 86 87 |
# File 'lib/yoda/typing/context.rb', line 83 def eql?(another) another.is_a?(ParserNodeWrapper) && node == another.node && node.location == another.node.location end |
#hash ⇒ Object
89 90 91 |
# File 'lib/yoda/typing/context.rb', line 89 def hash [node, node.location].hash end |