Class: LibRubyParser::Nodes::Lvar
- Inherits:
-
LibRubyParser::Node
- Object
- LibRubyParser::Node
- LibRubyParser::Nodes::Lvar
- Defined in:
- lib/lib-ruby-parser/nodes.rb
Overview
Represents access to a local variable (i.e. foo
)
Parser knows that it's a local variable because:
- there was an assignment to this variable before accessing it
- it's an argument of the current method / block
- it's been implicitly declared by
MatchWithLvasgn
node
Otherwise it's a method call (see Send
)
Instance Attribute Summary collapse
-
#expression_l ⇒ Loc
readonly
Location of the local variable.
-
#name ⇒ String
readonly
Name of the local variable.
Instance Attribute Details
#expression_l ⇒ Loc (readonly)
Location of the local variable
foo
~~~
2502 2503 2504 |
# File 'lib/lib-ruby-parser/nodes.rb', line 2502 def expression_l @expression_l end |
#name ⇒ String (readonly)
Name of the local variable
2493 2494 2495 |
# File 'lib/lib-ruby-parser/nodes.rb', line 2493 def name @name end |