class YARP::IfNode
Experimental RBS support (using type sampling data from the type_fusion
project).
# sig/yarp/node.rbs class YARP::IfNode < YARP::Node def accept: (Analyzer::Visitor visitor) -> untyped def child_nodes: () -> untyped def initialize: (YARP::Location? if_keyword_loc, YARP::CallNode predicate, YARP::StatementsNode statements, YARP::ElseNode? consequent, YARP::Location? end_keyword_loc, YARP::Location location) -> void end
^^^^^^^^^^^^^^^^^^^
if foo then bar end
^^^^^^^^^^
bar if foo
Represents the use of the ‘if` keyword, either in the block form or the modifier form.
def accept(visitor)
Experimental RBS support (using type sampling data from the type_fusion
project).
def accept: (Analyzer::Visitor visitor) -> untyped
This signature was generated using 8 samples from 1 application.
def accept(visitor) visitor.visit_if_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 5 samples from 1 application.
def child_nodes [predicate, statements, consequent] end
def deconstruct_keys(keys)
def deconstruct_keys(keys) { if_keyword_loc: if_keyword_loc, predicate: predicate, statements: statements, consequent: consequent, end_keyword_loc: end_keyword_loc, location: location } end
def end_keyword
def end_keyword end_keyword_loc&.slice end
def if_keyword
def if_keyword if_keyword_loc&.slice end
def initialize(if_keyword_loc, predicate, statements, consequent, end_keyword_loc, location)
Experimental RBS support (using type sampling data from the type_fusion
project).
def initialize: (YARP::Location? if_keyword_loc, YARP::CallNode predicate, YARP::StatementsNode statements, YARP::ElseNode? consequent, YARP::Location? end_keyword_loc, YARP::Location location) -> void
This signature was generated using 5 samples from 1 application.
def initialize(if_keyword_loc, predicate, statements, consequent, end_keyword_loc, location) @if_keyword_loc = if_keyword_loc @predicate = predicate @statements = statements @consequent = consequent @end_keyword_loc = end_keyword_loc @location = location end
def set_newline_flag(newline_marked)
def set_newline_flag(newline_marked) predicate.set_newline_flag(newline_marked) end