Class: LibRubyParser::Nodes::Cvasgn

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

Overview

Represents class variable assignment (i.e. @@var = 42)

Instance Attribute Summary collapse

Instance Attribute Details

#expression_lLoc (readonly)

Location of the full expression

@@foo = 1
~~~~~~~~~

Returns:



997
998
999
# File 'lib/lib-ruby-parser/nodes.rb', line 997

def expression_l
  @expression_l
end

#nameString (readonly)

Name of the class variable, String("@@foo") for @@foo = 1

Returns:

  • (String)


966
967
968
# File 'lib/lib-ruby-parser/nodes.rb', line 966

def name
  @name
end

#name_lLoc (readonly)

Location of the class variable name

@@foo = 1
~~~~~

Returns:



979
980
981
# File 'lib/lib-ruby-parser/nodes.rb', line 979

def name_l
  @name_l
end

#operator_lLoc? (readonly)

Location of the = operator

@@foo = 1
      ~

Returns:



988
989
990
# File 'lib/lib-ruby-parser/nodes.rb', line 988

def operator_l
  @operator_l
end

#valueNode? (readonly)

Value that is assigned to class variable, Int("1") for @@foo = 1

Returns:



970
971
972
# File 'lib/lib-ruby-parser/nodes.rb', line 970

def value
  @value
end