Class: LibRubyParser::Nodes::Ivasgn

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

Overview

Represents instance variable assignment (i.e @foo = 42)

Instance Attribute Summary collapse

Instance Attribute Details

#expression_lLoc (readonly)

Location of the full expression

~~~~~~~~~

Returns:



2249
2250
2251
# File 'lib/lib-ruby-parser/nodes.rb', line 2249

def expression_l
  @expression_l
end

#nameString (readonly)

Name of the instance variable, String("@foo") in @foo = 42

Returns:

  • (String)


2212
2213
2214
# File 'lib/lib-ruby-parser/nodes.rb', line 2212

def name
  @name
end

#name_lLoc (readonly)

Location of the instance variable name.

~~~~

Returns:



2228
2229
2230
# File 'lib/lib-ruby-parser/nodes.rb', line 2228

def name_l
  @name_l
end

#operator_lLoc? (readonly)

Location of the = operator.

</code>

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

Returns:



2240
2241
2242
# File 'lib/lib-ruby-parser/nodes.rb', line 2240

def operator_l
  @operator_l
end

#valueNode? (readonly)

Value that is assigned to instance variable.

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

Returns:



2219
2220
2221
# File 'lib/lib-ruby-parser/nodes.rb', line 2219

def value
  @value
end