class SyntaxTree::SClass
Experimental RBS support (using type sampling data from the type_fusion project).
# sig/syntax_tree/node.rbs class SyntaxTree::SClass < SyntaxTree::Node def initialize: (target: SyntaxTree::VarRef, bodystmt: SyntaxTree::BodyStmt, location: SyntaxTree::Location) -> void end
end
class << self
singleton methods.
context of the singleton class of an object. It’s frequently used to define
SClass represents a block of statements that should be evaluated within the
def ===(other)
def ===(other) other.is_a?(SClass) && target === other.target && bodystmt === other.bodystmt end
def accept(visitor)
def accept(visitor) visitor.visit_sclass(self) end
def child_nodes
def child_nodes [target, bodystmt] end
def copy(target: nil, bodystmt: nil, location: nil)
def copy(target: nil, bodystmt: nil, location: nil) node = SClass.new( target: target || self.target, bodystmt: bodystmt || self.bodystmt, location: location || self.location ) node.comments.concat(comments.map(&:copy)) node end
def deconstruct_keys(_keys)
def deconstruct_keys(_keys) { target: target, bodystmt: bodystmt, location: location, comments: comments } end
def format(q)
def format(q) q.text("class << ") q.group do q.format(target) q.indent do q.breakable_force q.format(bodystmt) end q.breakable_force end q.text("end") end
def initialize(target:, bodystmt:, location:)
Experimental RBS support (using type sampling data from the type_fusion project).
def initialize: (target: SyntaxTree::VarRef, bodystmt: SyntaxTree::BodyStmt, location: SyntaxTree::Location) -> void
This signature was generated using 1 sample from 1 application.
def initialize(target:, bodystmt:, location:) @target = target @bodystmt = bodystmt @location = location @comments = [] end