Class Nodes.InstanceVariableWriteNode

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

public static final class Nodes.InstanceVariableWriteNode extends Nodes.Node
 Represents writing to an instance variable.

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

    • name

      public final org.jruby.RubySymbol name
       The name of the instance variable, which is a `@` followed by an [identifier](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#identifiers).
      
           @x = :y       # name `:@x`
      
           @_foo = "bar" # name `@_foo`
       
    • value

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

    • InstanceVariableWriteNode

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