On this page
Maintenance Ruby 3.4 gets fixes, but no new features. Switch to Ruby 4.0 →
class · Ruby 3.4
Prism::ConstantWriteNode
Represents writing to a constant.
Foo = 1 ^^^^^^^
Class methods 2
Instance methods 17
Attributes
Read
The name of the [constant](github.com/ruby/prism/blob/main/docs/parsing_rules.md#constants).
Example
Foo = :bar # name `:Foo` XYZ = 1 # name `:XYZ`
Read
The value to write to the constant. It can be any [non-void expression](github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression).
FOO = :bar
^^^^
MyClass = Class.new
^^^^^^^^^