Class: YARP::ForwardingArgumentsNode

Inherits:
YARPNode
  • Object
show all
Defined in:
lib/yarp/node.rb,
ext/yarp/api_node.c

Overview

Represents forwarding all arguments to this method to another method.

def foo(...)
  bar(...)
  ^^^^^^^^
end

Instance Method Summary collapse

Constructor Details

#initialize(location) ⇒ ForwardingArgumentsNode

def initialize: (location: Location) -> void



3146
3147
3148
# File 'lib/yarp/node.rb', line 3146

def initialize(location)
  @location = location
end

Instance Method Details

#accept(visitor) ⇒ Object

def accept: (visitor: Visitor) -> void



3151
3152
3153
# File 'lib/yarp/node.rb', line 3151

def accept(visitor)
  visitor.visit_forwarding_arguments_node(self)
end

#child_nodesObject Also known as: deconstruct

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



3156
3157
3158
# File 'lib/yarp/node.rb', line 3156

def child_nodes
  []
end

#copy(**params) ⇒ Object

def copy: (**params) -> ForwardingArgumentsNode



3161
3162
3163
3164
3165
# File 'lib/yarp/node.rb', line 3161

def copy(**params)
  ForwardingArgumentsNode.new(
    params.fetch(:location) { location },
  )
end

#deconstruct_keys(keys) ⇒ Object

def deconstruct_keys: (keys: Array) -> Hash[Symbol, nil | Node | Array | String | Token | Array | Location]



3171
3172
3173
# File 'lib/yarp/node.rb', line 3171

def deconstruct_keys(keys)
  { location: location }
end