class Crystal::Doc::Method
inherits Reference
¶
Included modules
Crystal::Doc::Item
Constants¶
PSEUDO_METHOD_NOTE = "\nNOTE: This is a pseudo-method provided directly by the Crystal compiler.\nIt cannot be redefined nor overridden."
¶
"\nNOTE: This is a pseudo-method provided directly by the Crystal compiler.\nIt cannot be redefined nor overridden."
PSEUDO_METHOD_PREFIX = "__crystal_pseudo_"
¶
"__crystal_pseudo_"
Class methods¶
Methods¶
#doc
¶
Returns this method's docs ready to be shown (before formatting)
in the UI. This includes copying docs from previous def or
ancestors and replacing :inherit:
with the ancestor docs.
This docs not include the "Description copied from ..." banner
in case it's needed.
#doc_copied_from : Type?
¶
: Type?
Returns the type this method's docs are copied from, but only if this method has no docs at all. In this case the docs will be copied from this type and a "Description copied from ..." will be added before the docs.
#to_s(io : IO) : Nil
¶
(io : IO) : Nil
Appends a short String representation of this object which includes its class name and its object address.
class Person
def initialize(@name : String, @age : Int32)
end
end
Person.new("John", 32).to_s # => #<Person:0x10a199f20>