Class: LibRubyParser::Nodes::Lvar

Inherits:
LibRubyParser::Node show all
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:

  1. there was an assignment to this variable before accessing it
  2. it's an argument of the current method / block
  3. it's been implicitly declared by MatchWithLvasgn node

Otherwise it's a method call (see Send)

Instance Attribute Summary collapse

Instance Attribute Details

#expression_lLoc (readonly)

Location of the local variable

foo
~~~

Returns:



2502
2503
2504
# File 'lib/lib-ruby-parser/nodes.rb', line 2502

def expression_l
  @expression_l
end

#nameString (readonly)

Name of the local variable

Returns:

  • (String)


2493
2494
2495
# File 'lib/lib-ruby-parser/nodes.rb', line 2493

def name
  @name
end