Class: LibRubyParser::Nodes::IndexAsgn

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

Instance Attribute Details

#begin_lLoc (readonly)

Location of open bracket

foo[1, 2, 3] = bar
   ~

Returns:



2056
2057
2058
# File 'lib/lib-ruby-parser/nodes.rb', line 2056

def begin_l
  @begin_l
end

#end_lLoc (readonly)

Location of closing bracket

foo[1, 2, 3] = bar
           ~

Returns:



2065
2066
2067
# File 'lib/lib-ruby-parser/nodes.rb', line 2065

def end_l
  @end_l
end

#expression_lLoc (readonly)

Location of the full expression

foo[1, 2, 3] = bar
~~~~~~~~~~~~~~~~~~

Returns:



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

Returns:



2040
2041
2042
# File 'lib/lib-ruby-parser/nodes.rb', line 2040

def indexes
  @indexes
end

#operator_lLoc? (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.

Returns:



2077
2078
2079
# File 'lib/lib-ruby-parser/nodes.rb', line 2077

def operator_l
  @operator_l
end

#recvNode (readonly)

Receiver of the indexing

Returns:



2036
2037
2038
# File 'lib/lib-ruby-parser/nodes.rb', line 2036

def recv
  @recv
end

#valueNode? (readonly)

Value that is assigned

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

Returns:



2047
2048
2049
# File 'lib/lib-ruby-parser/nodes.rb', line 2047

def value
  @value
end