class YARP::ImplicitNode
Represents a node that is implicitly being added to the tree but doesn’t correspond directly to a node in the source.
{ foo: } ^^^^ { Foo: } ^^^^
Attributes
value[R]
attr_reader value: Node
Public Class Methods
Public Instance Methods
accept(visitor)
click to toggle source
def accept: (visitor: Visitor
) -> void
# File lib/yarp/node.rb, line 5756 def accept(visitor) visitor.visit_implicit_node(self) end
child_nodes()
click to toggle source
def child_nodes
: () -> Array[nil | Node]
# File lib/yarp/node.rb, line 5761 def child_nodes [value] end
Also aliased as: deconstruct
comment_targets()
click to toggle source
def comment_targets
: () -> Array[Node | Location]
# File lib/yarp/node.rb, line 5771 def comment_targets [value] end
compact_child_nodes()
click to toggle source
def compact_child_nodes
: () -> Array
# File lib/yarp/node.rb, line 5766 def compact_child_nodes [value] end
copy(**params)
click to toggle source
def copy: (**params) -> ImplicitNode
# File lib/yarp/node.rb, line 5776 def copy(**params) ImplicitNode.new( params.fetch(:value) { value }, params.fetch(:location) { location }, ) end
deconstruct_keys(keys)
click to toggle source
inspect(inspector = NodeInspector.new)
click to toggle source
# File lib/yarp/node.rb, line 5791 def inspect(inspector = NodeInspector.new) inspector << inspector.header(self) inspector << "└── value:\n" inspector << inspector.child_node(value, " ") inspector.to_str end