Class: YARP::ArgumentsNode
- Inherits:
-
YARPNode
- Object
- YARPNode
- YARP::ArgumentsNode
- Defined in:
- lib/yarp/node.rb,
ext/yarp/api_node.c
Overview
Represents a set of arguments to a method or a keyword.
return foo, bar, baz
^^^^^^^^^^^^^
Instance Attribute Summary collapse
-
#arguments ⇒ Object
readonly
attr_reader arguments: Array.
Instance Method Summary collapse
-
#accept(visitor) ⇒ Object
def accept: (visitor: Visitor) -> void.
-
#child_nodes ⇒ Object
(also: #deconstruct)
def child_nodes: () -> Array[nil | Node].
- #deconstruct_keys(keys) ⇒ Object
-
#initialize(arguments, location) ⇒ ArgumentsNode
constructor
def initialize: (arguments: Array, location: Location) -> void.
Constructor Details
#initialize(arguments, location) ⇒ ArgumentsNode
def initialize: (arguments: Array, location: Location) -> void
159 160 161 162 |
# File 'lib/yarp/node.rb', line 159 def initialize(arguments, location) @arguments = arguments @location = location end |
Instance Attribute Details
#arguments ⇒ Object (readonly)
attr_reader arguments: Array
156 157 158 |
# File 'lib/yarp/node.rb', line 156 def arguments @arguments end |
Instance Method Details
#accept(visitor) ⇒ Object
def accept: (visitor: Visitor) -> void
165 166 167 |
# File 'lib/yarp/node.rb', line 165 def accept(visitor) visitor.visit_arguments_node(self) end |
#child_nodes ⇒ Object Also known as: deconstruct
def child_nodes: () -> Array[nil | Node]
171 172 173 |
# File 'lib/yarp/node.rb', line 171 def child_nodes [*arguments] end |