Class: LibRubyParser::Nodes::Ivasgn
- Inherits:
-
LibRubyParser::Node
- Object
- LibRubyParser::Node
- LibRubyParser::Nodes::Ivasgn
- Defined in:
- lib/lib-ruby-parser/nodes.rb
Overview
Represents instance 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 instance variable, ‘String(“@foo”)` in `@foo = 42`.
-
#name_l ⇒ Loc
readonly
Location of the instance variable name.
-
#operator_l ⇒ Loc?
readonly
Location of the ‘=` operator.
-
#value ⇒ Node?
readonly
Value that is assigned to instance variable.
Instance Attribute Details
#expression_l ⇒ Loc (readonly)
Location of the full expression
“‘text ~~~~~~~~~ “`
2249 2250 2251 |
# File 'lib/lib-ruby-parser/nodes.rb', line 2249 def expression_l @expression_l end |
#name ⇒ String (readonly)
Name of the instance variable, ‘String(“@foo”)` in `@foo = 42`
2212 2213 2214 |
# File 'lib/lib-ruby-parser/nodes.rb', line 2212 def name @name end |
#name_l ⇒ Loc (readonly)
Location of the instance variable name.
“‘text ~~~~ “`
2228 2229 2230 |
# File 'lib/lib-ruby-parser/nodes.rb', line 2228 def name_l @name_l end |
#operator_l ⇒ Loc? (readonly)
Location of the ‘=` operator.
“‘text “`
None if instance variable assignment is a part of the multi-assignment. In such case value is a part of the Masgn node.
2240 2241 2242 |
# File 'lib/lib-ruby-parser/nodes.rb', line 2240 def operator_l @operator_l end |
#value ⇒ Node? (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.
2219 2220 2221 |
# File 'lib/lib-ruby-parser/nodes.rb', line 2219 def value @value end |