Class: YARP::ForwardingParameterNode
- Inherits:
-
YARPNode
- Object
- YARPNode
- YARP::ForwardingParameterNode
- Defined in:
- lib/yarp/node.rb,
ext/yarp/api_node.c
Overview
Represents the use of the forwarding parameter in a method, block, or lambda declaration.
def foo(...)
^^^
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) -> ForwardingParameterNode.
- #deconstruct_keys(keys) ⇒ Object
-
#initialize(location) ⇒ ForwardingParameterNode
constructor
def initialize: (location: Location) -> void.
- #inspect(inspector = NodeInspector.new) ⇒ Object
Constructor Details
#initialize(location) ⇒ ForwardingParameterNode
def initialize: (location: Location) -> void
4408 4409 4410 |
# File 'lib/yarp/node.rb', line 4408 def initialize(location) @location = location end |
Instance Method Details
#accept(visitor) ⇒ Object
def accept: (visitor: Visitor) -> void
4413 4414 4415 |
# File 'lib/yarp/node.rb', line 4413 def accept(visitor) visitor.visit_forwarding_parameter_node(self) end |
#child_nodes ⇒ Object Also known as: deconstruct
def child_nodes: () -> Array[nil | Node]
4418 4419 4420 |
# File 'lib/yarp/node.rb', line 4418 def child_nodes [] end |
#comment_targets ⇒ Object
def comment_targets: () -> Array[Node | Location]
4423 4424 4425 |
# File 'lib/yarp/node.rb', line 4423 def comment_targets [] end |
#copy(**params) ⇒ Object
def copy: (**params) -> ForwardingParameterNode
4428 4429 4430 4431 4432 |
# File 'lib/yarp/node.rb', line 4428 def copy(**params) ForwardingParameterNode.new( params.fetch(:location) { location }, ) end |
#deconstruct_keys(keys) ⇒ Object
4438 4439 4440 |
# File 'lib/yarp/node.rb', line 4438 def deconstruct_keys(keys) { location: location } end |
#inspect(inspector = NodeInspector.new) ⇒ Object
4442 4443 4444 4445 |
# File 'lib/yarp/node.rb', line 4442 def inspect(inspector = NodeInspector.new) inspector << inspector.header(self) inspector.to_str end |