class Documentable
Represents a self-contained Raku documentation element.
This class is the base for Documentable::Primary and Documentable::Secondary. Everything documented is represented by a child class of Documentable
.
Methods
submethod BUILD
Defined as
submethod BUILD(:, :!, :, :, :!)
Returns a Documentable
object correctly initialized.
method name
Defined as
method name(--> Str)
Returns $!name
. You must have in mind that this value is not unique, so there could be more than one Documentable
instance with the same name.
method kind
Defined as
method kind(--> Kind)
Returns $!kind
. See Kind to get more info.
method pod
Defined as
method pod(--> Pod::Block)
Returns $!pod
. $!pod
is the documentation represented by this object.
method subkinds
Defined as
method subkinds(-->Array[Str])
Returns @!subkinds
.
method categories
Returns @!categories
. If @!categories
is not defined, @!subkinds
will be returned instead.
method english-list
Defined as:
method english-list()
This is a helper method used to convert lists (@.subkinds
) to an "english" format.
my = Documentable.new(kind => Kind::Type,subkinds => ["a", "b"],pod => []);say .english-list # OUTPUT: a and b»