Represents assigning to a method call.

foo.bar, = 1
^^^^^^^

begin
rescue => foo.bar
          ^^^^^^^
end

for foo.bar in baz do end
    ^^^^^^^
Attributes
Read

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

foo.bar = 1
^^^
Read

Represents the name of the method being called.

foo.bar = 1 # name `:foo`
^^^
Class Methods

Initialize a new CallTargetNode 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

def call_operator: () -> String

Represents the location of the call operator.

foo.bar = 1
   ^

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, ?name: Symbol, ?message_loc: Location) -> CallTargetNode

An alias for child_nodes

def deconstruct_keys: (Array keys) -> { node_id: Integer, location: Location, receiver: Prism::node, call_operator_loc: Location, name: Symbol, message_loc: Location }

def ignore_visibility?: () -> bool

def inspect -> String

def message: () -> String

Represents the location of the message.

foo.bar = 1
    ^^^

def safe_navigation?: () -> bool

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