Class Nodes.ClassVariableWriteNode

java.lang.Object
org.prism.Nodes.Node
org.prism.Nodes.ClassVariableWriteNode
Enclosing class:
Nodes

public static final class Nodes.ClassVariableWriteNode extends Nodes.Node
 Represents writing to a class variable.

     @@foo = 1
     ^^^^^^^^^
 
  • Field Details

    • name

      public final org.jruby.RubySymbol name
       The name of the class variable, which is a `@@` followed by an [identifier](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#identifiers).
      
           @@abc = 123     # name `@@abc`
      
           @@_test = :test # name `@@_test`
       
    • value

      public final Nodes.Node value
       The value to write to the class variable. This can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression).
      
           @@foo = :bar
                   ^^^^
      
           @@_xyz = 123
                    ^^^
       
  • Constructor Details

    • ClassVariableWriteNode

      public ClassVariableWriteNode(int startOffset, int length, org.jruby.RubySymbol name, Nodes.Node value)
  • Method Details