class Cosmo::ClassInstance

Defined in:

cosmo/runtime/types/class_instance.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(parent : Cosmo::Class, args : Array(Cosmo::ValueType)) #

[View source]

Instance Method Detail

def define_field(field_name : String, value : ValueType, token : Token | Nil, mutable = false, visibility : Visibility = Visibility::Private, typedef : Token | Nil = nil, not_redefining = false) : ValueType #

[View source]
def define_method(method_name : String, value : Function, token : Token | Nil = nil, visibility : Visibility = Visibility::Private) : Function #

[View source]
def get_field(field_name : String, token : Token | Nil = nil, include_private = true, include_protected = false, required = true) : ValueType #

[View source]
def get_member(member_name : String, token : Token | Nil = nil, include_private = true, include_protected = false, method_required = false, field_required = true) : ValueType #

[View source]
def get_method(method_name : String, token : Token | Nil = nil, include_private = true, include_protected = false, required = true) : Function | Nil #

[View source]
def name #

Returns the class' name


[View source]
def name_token #

Returns the class' name token


[View source]
def setup : Nil #

Calls the construct method


[View source]