class Cosmo::Class

Defined in:

cosmo/runtime/types/class.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(interpreter : Cosmo::Interpreter, closure : Cosmo::Scope, definition : Cosmo::AST::Statement::ClassDef, superclass : Nil | Cosmo::Class) #

[View source]

Instance Method Detail

def construct(args : Array(ValueType)) : ClassInstance #

Executes the class body, creates a ClassInstance, and calls setup on it


[View source]
def definition : Statement::ClassDef #

[View source]
def interpreter : Interpreter #

[View source]
def name #

[View source]
def name_token #

[View source]
def superclass : Class | Nil #

[View source]
def to_s : String #
Description copied from class Object

Returns a nicely readable and concise string representation of this object, typically intended for users.

This method should usually not be overridden. It delegates to #to_s(IO) which can be overridden for custom implementations.

Also see #inspect.


[View source]