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
156 157 158 159 |
# File 'lib/yarp/node.rb', line 156 def initialize(arguments, location) @arguments = arguments @location = location end |
Instance Attribute Details
#arguments ⇒ Object (readonly)
attr_reader arguments: Array
153 154 155 |
# File 'lib/yarp/node.rb', line 153 def arguments @arguments end |
Instance Method Details
#accept(visitor) ⇒ Object
def accept: (visitor: Visitor) -> void
162 163 164 |
# File 'lib/yarp/node.rb', line 162 def accept(visitor) visitor.visit_arguments_node(self) end |
#child_nodes ⇒ Object Also known as: deconstruct
def child_nodes: () -> Array[nil | Node]
167 168 169 |
# File 'lib/yarp/node.rb', line 167 def child_nodes [*arguments] end |