class YARP::RescueNode
Experimental RBS support (using type sampling data from the type_fusion
project).
# sig/yarp/node.rbs class YARP::RescueNode < YARP::Node def accept: (Analyzer::Visitor visitor) -> Array[Array, NilClass] def child_nodes: () -> untyped def initialize: (YARP::Location keyword_loc, (Array[] | Array[YARP::ConstantPathNode]) exceptions, YARP::Location? operator_loc, YARP::LocalVariableWriteNode? reference, YARP::StatementsNode statements, nil consequent, YARP::Location location) -> void end
‘ex` is in the `exception` field.
`Foo, *splat, Bar` are in the `exceptions` field.
end
foo
^^^^^^
rescue Foo, *splat, Bar => ex
begin
Represents a rescue statement.
def accept(visitor)
Experimental RBS support (using type sampling data from the type_fusion
project).
def accept: (Analyzer::Visitor visitor) -> Array | Array | Array | Array | | NilClass | NilClass | Array | Array | | Array | Array | Array | | Array | | NilClass | Array | NilClass | NilClass | NilClass | NilClass
This signature was generated using 3 samples from 1 application.
def accept(visitor) visitor.visit_rescue_node(self) end
def child_nodes
Experimental RBS support (using type sampling data from the type_fusion
project).
def child_nodes: () -> untyped
This signature was generated using 1 sample from 1 application.
def child_nodes [*exceptions, reference, statements, consequent] end
def deconstruct_keys(keys)
def deconstruct_keys(keys) { keyword_loc: keyword_loc, exceptions: exceptions, operator_loc: operator_loc, reference: reference, statements: statements, consequent: consequent, location: location } end
def initialize(keyword_loc, exceptions, operator_loc, reference, statements, consequent, location)
Experimental RBS support (using type sampling data from the type_fusion
project).
def initialize: (YARP::Location keyword_loc, exceptions, YARP::Location? operator_loc, YARP::LocalVariableWriteNode? reference, YARP::StatementsNode statements, nil consequent, YARP::Location location) -> void
This signature was generated using 2 samples from 1 application.
def initialize(keyword_loc, exceptions, operator_loc, reference, statements, consequent, location) @keyword_loc = keyword_loc @exceptions = exceptions @operator_loc = operator_loc @reference = reference @statements = statements @consequent = consequent @location = location end
def keyword
def keyword keyword_loc.slice end
def operator
def operator operator_loc&.slice end