Class: YARP::ForwardingArgumentsNode
- Inherits:
-
YARPNode
- Object
- YARPNode
- YARP::ForwardingArgumentsNode
- 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
-
#accept(visitor) ⇒ Object
def accept: (visitor: Visitor) -> void.
-
#child_nodes ⇒ Object
(also: #deconstruct)
def child_nodes: () -> Array[nil | Node].
-
#comment_targets ⇒ Object
def comment_targets: () -> Array[Node | Location].
-
#copy(**params) ⇒ Object
def copy: (**params) -> ForwardingArgumentsNode.
- #deconstruct_keys(keys) ⇒ Object
-
#initialize(location) ⇒ ForwardingArgumentsNode
constructor
def initialize: (location: Location) -> void.
- #inspect(inspector = NodeInspector.new) ⇒ Object
Constructor Details
#initialize(location) ⇒ ForwardingArgumentsNode
def initialize: (location: Location) -> void
4361 4362 4363 |
# File 'lib/yarp/node.rb', line 4361 def initialize(location) @location = location end |
Instance Method Details
#accept(visitor) ⇒ Object
def accept: (visitor: Visitor) -> void
4366 4367 4368 |
# File 'lib/yarp/node.rb', line 4366 def accept(visitor) visitor.visit_forwarding_arguments_node(self) end |
#child_nodes ⇒ Object Also known as: deconstruct
def child_nodes: () -> Array[nil | Node]
4371 4372 4373 |
# File 'lib/yarp/node.rb', line 4371 def child_nodes [] end |
#comment_targets ⇒ Object
def comment_targets: () -> Array[Node | Location]
4376 4377 4378 |
# File 'lib/yarp/node.rb', line 4376 def comment_targets [] end |
#copy(**params) ⇒ Object
def copy: (**params) -> ForwardingArgumentsNode
4381 4382 4383 4384 4385 |
# File 'lib/yarp/node.rb', line 4381 def copy(**params) ForwardingArgumentsNode.new( params.fetch(:location) { location }, ) end |
#deconstruct_keys(keys) ⇒ Object
4391 4392 4393 |
# File 'lib/yarp/node.rb', line 4391 def deconstruct_keys(keys) { location: location } end |
#inspect(inspector = NodeInspector.new) ⇒ Object
4395 4396 4397 4398 |
# File 'lib/yarp/node.rb', line 4395 def inspect(inspector = NodeInspector.new) inspector << inspector.header(self) inspector.to_str end |