Represents the use of an assignment operator on a call.

foo.bar += baz
^^^^^^^^^^^^^^
Attributes
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 name of the method being called.

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

Represents the name of the method being written to.

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

Represents the binary operator being used.

foo.bar += value # binary_operator `:+`
        ^
Read

Represents the value being assigned.

foo.bar += value
           ^^^^^
Class Methods

Initialize a new CallOperatorWriteNode node.

Return a symbol representation of this node type. See ‘Node::type`.

Instance Methods

Implements case-equality for the node. This is effectively == but without comparing the value of locations. Locations are checked only for presence.

def accept: (Visitor visitor) -> void

def attribute_write?: () -> bool

Represents the location of the binary operator.

foo.bar += value
        ^^

def call_operator: () -> String?

Represents the location of the call operator.

foo.bar += value
   ^

def child_nodes: () -> Array[nil | Node]

def comment_targets: () -> Array[Node | Location]

def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?receiver: Prism::node?, ?call_operator_loc: Location?, ?message_loc: Location?, ?read_name: Symbol, ?write_name: Symbol, ?binary_operator: Symbol, ?binary_operator_loc: Location, ?value: Prism::node) -> CallOperatorWriteNode

An alias for child_nodes

def deconstruct_keys: (Array keys) -> { node_id: Integer, location: Location, receiver: Prism::node?, call_operator_loc: Location?, message_loc: Location?, read_name: Symbol, write_name: Symbol, binary_operator: Symbol, binary_operator_loc: Location, value: Prism::node }

def ignore_visibility?: () -> bool

def inspect -> String

def message: () -> String?

Represents the location of the message.

foo.bar += value
    ^^^

Returns the binary operator used to modify the receiver. This method is deprecated in favor of binary_operator.

Returns the location of the binary operator used to modify the receiver. This method is deprecated in favor of binary_operator_loc.

def safe_navigation?: () -> bool

Save the binary_operator_loc location using the given saved source so that it can be retrieved later.

Save the call_operator_loc location using the given saved source so that it can be retrieved later.

Save the message_loc location using the given saved source so that it can be retrieved later.

Return a symbol representation of this node type. See ‘Node#type`.

def variable_call?: () -> bool