Class: LibRubyParser::Nodes::Lvasgn
- Inherits:
-
LibRubyParser::Node
- Object
- LibRubyParser::Node
- LibRubyParser::Nodes::Lvasgn
- Defined in:
- lib/lib-ruby-parser/nodes.rb
Overview
Represents local variable assignment (i.e. foo = 42
)
Instance Attribute Summary collapse
-
#expression_l ⇒ Loc
readonly
Location of the full expression.
-
#name ⇒ String
readonly
Name of the local variable.
-
#name_l ⇒ Loc
readonly
Location of the local variable name.
-
#operator_l ⇒ Loc?
readonly
Location of the
=
operator. -
#value ⇒ Node?
readonly
Value that is assigned to a local variable.
Instance Attribute Details
#expression_l ⇒ Loc (readonly)
Location of the full expression
foo = 42
~~~~~~~~
2544 2545 2546 |
# File 'lib/lib-ruby-parser/nodes.rb', line 2544 def expression_l @expression_l end |
#name ⇒ String (readonly)
Name of the local variable
2510 2511 2512 |
# File 'lib/lib-ruby-parser/nodes.rb', line 2510 def name @name end |
#name_l ⇒ Loc (readonly)
Location of the local variable name
foo = 42
~~~
2523 2524 2525 |
# File 'lib/lib-ruby-parser/nodes.rb', line 2523 def name_l @name_l end |
#operator_l ⇒ Loc? (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.
2535 2536 2537 |
# File 'lib/lib-ruby-parser/nodes.rb', line 2535 def operator_l @operator_l end |
#value ⇒ Node? (readonly)
Value that is assigned to a local variable
2514 2515 2516 |
# File 'lib/lib-ruby-parser/nodes.rb', line 2514 def value @value end |