Skip to content
On this page

Maintenance Ruby 3.4 gets fixes, but no new features. Switch to Ruby 4.0 →

class · Ruby 3.4

Prism::CallOrWriteNode

< Prism::Node 23 instance methods 2 class methods

Represents the use of the ‘||=` operator on a call.

foo.bar ||= value
^^^^^^^^^^^^^^^^^

Class methods 2

Instance methods 23

Attributes
Read

Represents the name of the method being called.

foo.bar ||= value # read_name `:bar`
    ^^^
Read

The object that the method is being called on. This can be either nil or any [non-void expressions](github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression).

foo.bar ||= value
^^^
Read

Represents the value being assigned.

foo.bar ||= value
            ^^^^^
Read

Represents the name of the method being written to.

foo.bar ||= value # write_name `:bar=`
    ^^^