Class: LibRubyParser::Nodes::Lvasgn

Inherits:
LibRubyParser::Node show all
Defined in:
lib/lib-ruby-parser/nodes.rb

Overview

Represents local variable assignment (i.e. foo = 42)

Instance Attribute Summary collapse

Instance Attribute Details

#expression_lLoc (readonly)

Location of the full expression

foo = 42
~~~~~~~~

Returns:



2544
2545
2546
# File 'lib/lib-ruby-parser/nodes.rb', line 2544

def expression_l
  @expression_l
end

#nameString (readonly)

Name of the local variable

Returns:

  • (String)


2510
2511
2512
# File 'lib/lib-ruby-parser/nodes.rb', line 2510

def name
  @name
end

#name_lLoc (readonly)

Location of the local variable name

foo = 42
~~~

Returns:



2523
2524
2525
# File 'lib/lib-ruby-parser/nodes.rb', line 2523

def name_l
  @name_l
end

#operator_lLoc? (readonly)

Location of the = operator

foo = 42
    ~

None if local variable assignment is a part of the multi-assignment. In such case value is a part of the Masgn node.

Returns:



2535
2536
2537
# File 'lib/lib-ruby-parser/nodes.rb', line 2535

def operator_l
  @operator_l
end

#valueNode? (readonly)

Value that is assigned to a local variable

Returns:



2514
2515
2516
# File 'lib/lib-ruby-parser/nodes.rb', line 2514

def value
  @value
end