Class: YARP::RedoNode
- Inherits:
-
YARPNode
- Object
- YARPNode
- YARP::RedoNode
- Defined in:
- lib/yarp/node.rb,
ext/yarp/api_node.c
Overview
Represents the use of the ‘redo` keyword.
redo
^^^^
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) -> RedoNode.
- #deconstruct_keys(keys) ⇒ Object
-
#initialize(location) ⇒ RedoNode
constructor
def initialize: (location: Location) -> void.
- #inspect(inspector = NodeInspector.new) ⇒ Object
Constructor Details
#initialize(location) ⇒ RedoNode
def initialize: (location: Location) -> void
8457 8458 8459 |
# File 'lib/yarp/node.rb', line 8457 def initialize(location) @location = location end |
Instance Method Details
#accept(visitor) ⇒ Object
def accept: (visitor: Visitor) -> void
8462 8463 8464 |
# File 'lib/yarp/node.rb', line 8462 def accept(visitor) visitor.visit_redo_node(self) end |
#child_nodes ⇒ Object Also known as: deconstruct
def child_nodes: () -> Array[nil | Node]
8467 8468 8469 |
# File 'lib/yarp/node.rb', line 8467 def child_nodes [] end |
#comment_targets ⇒ Object
def comment_targets: () -> Array[Node | Location]
8472 8473 8474 |
# File 'lib/yarp/node.rb', line 8472 def comment_targets [] end |
#copy(**params) ⇒ Object
def copy: (**params) -> RedoNode
8477 8478 8479 8480 8481 |
# File 'lib/yarp/node.rb', line 8477 def copy(**params) RedoNode.new( params.fetch(:location) { location }, ) end |
#deconstruct_keys(keys) ⇒ Object
8487 8488 8489 |
# File 'lib/yarp/node.rb', line 8487 def deconstruct_keys(keys) { location: location } end |
#inspect(inspector = NodeInspector.new) ⇒ Object
8491 8492 8493 8494 |
# File 'lib/yarp/node.rb', line 8491 def inspect(inspector = NodeInspector.new) inspector << inspector.header(self) inspector.to_str end |