Class: LibRubyParser::Nodes::IndexAsgn
- Inherits:
-
LibRubyParser::Node
- Object
- LibRubyParser::Node
- LibRubyParser::Nodes::IndexAsgn
- Defined in:
- lib/lib-ruby-parser/nodes.rb
Overview
Represents assignment using indexing operation (i.e. foo[1, 2, 3] = bar
)
Instance Attribute Summary collapse
-
#begin_l ⇒ Loc
readonly
Location of open bracket.
-
#end_l ⇒ Loc
readonly
Location of closing bracket.
-
#expression_l ⇒ Loc
readonly
Location of the full expression.
-
#indexes ⇒ ::Array<Node>
readonly
A list of indexes.
-
#operator_l ⇒ Loc?
readonly
Location of the
=
operator. -
#recv ⇒ Node
readonly
Receiver of the indexing.
-
#value ⇒ Node?
readonly
Value that is assigned.
Instance Attribute Details
#begin_l ⇒ Loc (readonly)
Location of open bracket
foo[1, 2, 3] = bar
~
2056 2057 2058 |
# File 'lib/lib-ruby-parser/nodes.rb', line 2056 def begin_l @begin_l end |
#end_l ⇒ Loc (readonly)
Location of closing bracket
foo[1, 2, 3] = bar
~
2065 2066 2067 |
# File 'lib/lib-ruby-parser/nodes.rb', line 2065 def end_l @end_l end |
#expression_l ⇒ Loc (readonly)
Location of the full expression
foo[1, 2, 3] = bar
~~~~~~~~~~~~~~~~~~
2086 2087 2088 |
# File 'lib/lib-ruby-parser/nodes.rb', line 2086 def expression_l @expression_l end |
#indexes ⇒ ::Array<Node> (readonly)
A list of indexes
2040 2041 2042 |
# File 'lib/lib-ruby-parser/nodes.rb', line 2040 def indexes @indexes end |
#operator_l ⇒ Loc? (readonly)
Location of the =
operator
foo[1, 2, 3] = bar
~
None
if assignment is a part of the multi-assignment.
In such case operator =
belongs to Masgn
node.
2077 2078 2079 |
# File 'lib/lib-ruby-parser/nodes.rb', line 2077 def operator_l @operator_l end |
#recv ⇒ Node (readonly)
Receiver of the indexing
2036 2037 2038 |
# File 'lib/lib-ruby-parser/nodes.rb', line 2036 def recv @recv end |
#value ⇒ Node? (readonly)
Value that is assigned
None
if assignment is a part of the multi-assignment.
In such case value
belongs to Masgn
node.
2047 2048 2049 |
# File 'lib/lib-ruby-parser/nodes.rb', line 2047 def value @value end |