abstract class Crystal::NamedType
inherits Crystal::Type
¶
A type that has a name and can be inside a namespace.
For example, given class Foo::Bar
, Foo
is the namespace and Bar
is the name.
There are other types that have a name but it can be deduced from other(s) type(s), so they don't inherit NamedType: a union type, a metaclass, etc.
Direct known subclasses
Crystal::AliasType
Crystal::AnnotationType
Crystal::Const
Crystal::ModuleType
Crystal::NoReturnType
Crystal::TypeDefType
Crystal::VoidType
Class methods¶
Methods¶
#namespace : ModuleType
¶
: ModuleType
The namespace this type belongs to. Every type belongs to
a namespace, and, when not explicit, the namespace is the Program
itself.