class YARP::ForwardingSuperNode
Represents the use of the ‘super` keyword without parentheses or arguments.
super ^^^^^
Attributes
block[R]
attr_reader block: BlockNode
?
Public Class Methods
new(block, location)
click to toggle source
def initialize: (block: BlockNode
?, location: Location) -> void
# File lib/yarp/node.rb, line 4885 def initialize(block, location) @block = block @location = location end
Public Instance Methods
accept(visitor)
click to toggle source
def accept: (visitor: Visitor
) -> void
# File lib/yarp/node.rb, line 4891 def accept(visitor) visitor.visit_forwarding_super_node(self) end
child_nodes()
click to toggle source
def child_nodes
: () -> Array[nil | Node]
# File lib/yarp/node.rb, line 4896 def child_nodes [block] end
Also aliased as: deconstruct
comment_targets()
click to toggle source
def comment_targets
: () -> Array[Node | Location]
# File lib/yarp/node.rb, line 4908 def comment_targets [*block] end
compact_child_nodes()
click to toggle source
def compact_child_nodes
: () -> Array
# File lib/yarp/node.rb, line 4901 def compact_child_nodes compact = [] compact << block if block compact end
copy(**params)
click to toggle source
def copy: (**params) -> ForwardingSuperNode
# File lib/yarp/node.rb, line 4913 def copy(**params) ForwardingSuperNode.new( params.fetch(:block) { block }, params.fetch(:location) { location }, ) end
deconstruct_keys(keys)
click to toggle source
def deconstruct_keys
: (keys: Array) -> Hash[Symbol, nil | Node | Array | String
| Token | Array | Location]
# File lib/yarp/node.rb, line 4924 def deconstruct_keys(keys) { block: block, location: location } end
inspect(inspector = NodeInspector.new)
click to toggle source
# File lib/yarp/node.rb, line 4928 def inspect(inspector = NodeInspector.new) inspector << inspector.header(self) if (block = self.block).nil? inspector << "└── block: ∅\n" else inspector << "└── block:\n" inspector << block.inspect(inspector.child_inspector(" ")).delete_prefix(inspector.prefix) end inspector.to_str end