Skip to content

abstract class Crystal::ModuleType
inherits Crystal::NamedType

Base type for all module-like types (modules, classes, structs, enums).

Direct known subclasses

Crystal::ClassType Crystal::EnumType Crystal::GenericModuleType Crystal::LibType Crystal::NonGenericModuleType

Methods

#add_def(a_def)

View source

#add_hook(kind, a_macro, args_size = 0)

View source

#add_macro(a_macro)

View source

#defs : Hash(String, Array(DefWithMetadata))?

Returns the methods defined in this type, indexed by their name. This does not include methods defined in ancestors.

View source

#filter_by_responds_to(name)

View source

#hooks : Array(Hook)?

View source

#include(mod)

View source

#macros : Hash(String, Array(Macro))?

Returns all macros defines in this type, indexed by their name. This does not include methods defined in ancestors.

View source

#parents

View source

#type_desc

View source