class SyntaxTree::YieldNode
Experimental RBS support (using type sampling data from the type_fusion project).
# sig/syntax_tree/node.rbs class SyntaxTree::YieldNode < SyntaxTree::Node def accept: (Visitor visitor) -> untyped def child_nodes: () -> untyped def initialize: (arguments: SyntaxTree::Paren, location: SyntaxTree::Location) -> void end
yield value
Yield represents using the yield keyword with arguments.
def ===(other)
def ===(other) other.is_a?(YieldNode) && arguments === other.arguments end
def accept(visitor)
Experimental RBS support (using type sampling data from the type_fusion project).
def accept: (Visitor visitor) -> untyped
This signature was generated using 1 sample from 1 application.
def accept(visitor) visitor.visit_yield(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 [arguments] end
def copy(arguments: nil, location: nil)
def copy(arguments: nil, location: nil) node = YieldNode.new( arguments: arguments || self.arguments, location: location || self.location ) node.comments.concat(comments.map(&:copy)) node end
def deconstruct_keys(_keys)
def deconstruct_keys(_keys) { arguments: arguments, location: location, comments: comments } end
def format(q)
def format(q) if arguments.nil? q.text("yield") return end q.group do q.text("yield") if arguments.is_a?(Paren) q.format(arguments) else q.if_break { q.text("(") }.if_flat { q.text(" ") } q.indent do q.breakable_empty q.format(arguments) end q.breakable_empty q.if_break { q.text(")") } end end end
def initialize(arguments:, location:)
Experimental RBS support (using type sampling data from the type_fusion project).
def initialize: (arguments: SyntaxTree::Paren, location: SyntaxTree::Location) -> void
This signature was generated using 1 sample from 1 application.
def initialize(arguments:, location:) @arguments = arguments @location = location @comments = [] end