class YARP::LambdaNode
Experimental RBS support (using type sampling data from the type_fusion
project).
# sig/yarp/node.rbs class YARP::LambdaNode < YARP::Node def accept: (Analyzer::Visitor visitor) -> Array[Array, Array, Array, , Array, , NilClass, NilClass, NilClass] def child_nodes: () -> (Array[YARP::BlockParametersNode] | Array[NilClass]) def initialize: ((Array[Symbol] | Array[]) locals, YARP::Location opening_loc, YARP::BlockParametersNode? parameters, YARP::StatementsNode? body, YARP::Location location) -> void end
^^^^^^^^^^^^^^^^^^^^^^^
->(value) { value * 2 }
Represents using a lambda literal (not the lambda method call).
def accept(visitor)
Experimental RBS support (using type sampling data from the type_fusion
project).
def accept: (Analyzer::Visitor visitor) -> Array | Array | Array | | Array | Array | | NilClass
This signature was generated using 2 samples from 1 application.
def accept(visitor) visitor.visit_lambda_node(self) end
def child_nodes
Experimental RBS support (using type sampling data from the type_fusion
project).
def child_nodes: () -> YARP::StatementsNode
This signature was generated using 2 samples from 1 application.
def child_nodes [parameters, body] end
def deconstruct_keys(keys)
def deconstruct_keys(keys) { locals: locals, opening_loc: opening_loc, parameters: parameters, body: body, location: location } end
def initialize(locals, opening_loc, parameters, body, location)
Experimental RBS support (using type sampling data from the type_fusion
project).
def initialize: (( | Symbol | Symbol | Symbol) locals, YARP::Location opening_loc, YARP::BlockParametersNode? parameters, YARP::StatementsNode? body, YARP::Location location) -> void
This signature was generated using 5 samples from 1 application.
def initialize(locals, opening_loc, parameters, body, location) @locals = locals @opening_loc = opening_loc @parameters = parameters @body = body @location = location end
def opening
def opening opening_loc.slice end