Class: LibRubyParser::Nodes::Cvasgn
- Inherits:
-
LibRubyParser::Node
- Object
- LibRubyParser::Node
- LibRubyParser::Nodes::Cvasgn
- Defined in:
- lib/lib-ruby-parser/nodes.rb
Overview
Represents class variable assignment (i.e. ‘@@var = 42`)
Instance Attribute Summary collapse
-
#expression_l ⇒ Loc
readonly
Location of the full expression.
-
#name ⇒ String
readonly
Name of the class variable, ‘String(“@@foo”)` for `@@foo = 1`.
-
#name_l ⇒ Loc
readonly
Location of the class variable name.
-
#operator_l ⇒ Loc?
readonly
Location of the ‘=` operator.
-
#value ⇒ Node?
readonly
Value that is assigned to class variable, ‘Int(“1”)` for `@@foo = 1`.
Instance Attribute Details
#expression_l ⇒ Loc (readonly)
Location of the full expression
“‘text @@foo = 1 ~~~~~~~~~ “`
997 998 999 |
# File 'lib/lib-ruby-parser/nodes.rb', line 997 def expression_l @expression_l end |
#name ⇒ String (readonly)
Name of the class variable, ‘String(“@@foo”)` for `@@foo = 1`
966 967 968 |
# File 'lib/lib-ruby-parser/nodes.rb', line 966 def name @name end |
#name_l ⇒ Loc (readonly)
Location of the class variable name
“‘text @@foo = 1 ~~~~~ “`
979 980 981 |
# File 'lib/lib-ruby-parser/nodes.rb', line 979 def name_l @name_l end |
#operator_l ⇒ Loc? (readonly)
Location of the ‘=` operator
“‘text @@foo = 1
~
“‘
988 989 990 |
# File 'lib/lib-ruby-parser/nodes.rb', line 988 def operator_l @operator_l end |
#value ⇒ Node? (readonly)
Value that is assigned to class variable, ‘Int(“1”)` for `@@foo = 1`
970 971 972 |
# File 'lib/lib-ruby-parser/nodes.rb', line 970 def value @value end |