class YARP::ConstantPathNode
Experimental RBS support (using type sampling data from the type_fusion
project).
# sig/yarp/node.rbs class YARP::ConstantPathNode < YARP::Node def accept: (Analyzer::Visitor visitor) -> Array[Array, ] def child_nodes: () -> (Array[NilClass] | Array[YARP::ConstantReadNode]) def initialize: (nil parent, YARP::ConstantReadNode child, YARP::Location delimiter_loc, YARP::Location location) -> void end
^^^^^^^^
Foo::Bar
Represents accessing a constant through a path of ‘::` operators.
def accept(visitor)
Experimental RBS support (using type sampling data from the type_fusion
project).
def accept: (Analyzer::Visitor visitor) -> Array |
This signature was generated using 1 sample from 1 application.
def accept(visitor) visitor.visit_constant_path_node(self) end
def child_nodes
Experimental RBS support (using type sampling data from the type_fusion
project).
def child_nodes: () -> YARP::ConstantReadNode
This signature was generated using 2 samples from 1 application.
def child_nodes [parent, child] end
def comment_targets
def comment_targets [*parent, child, delimiter_loc] end
def copy(**params)
def copy(**params) ConstantPathNode.new( params.fetch(:parent) { parent }, params.fetch(:child) { child }, params.fetch(:delimiter_loc) { delimiter_loc }, params.fetch(:location) { location }, ) end
def deconstruct_keys(keys)
def deconstruct_keys(keys) { parent: parent, child: child, delimiter_loc: delimiter_loc, location: location } end
def delimiter
def delimiter delimiter_loc.slice end
def initialize(parent, child, delimiter_loc, location)
Experimental RBS support (using type sampling data from the type_fusion
project).
def initialize: (nil parent, YARP::ConstantReadNode child, YARP::Location delimiter_loc, YARP::Location location) -> void
This signature was generated using 2 samples from 1 application.
def initialize(parent, child, delimiter_loc, location) @parent = parent @child = child @delimiter_loc = delimiter_loc @location = location end
def inspect(inspector = NodeInspector.new)
def inspect(inspector = NodeInspector.new) inspector << inspector.header(self) if (parent = self.parent).nil? inspector << "├── parent: ∅\n" else inspector << "├── parent:\n" inspector << parent.inspect(inspector.child_inspector("│ ")).delete_prefix(inspector.prefix) end inspector << "├── child:\n" inspector << inspector.child_node(child, "│ ") inspector << "└── delimiter_loc: #{inspector.location(delimiter_loc)}\n" inspector.to_str end