Crystal::Macros::Def
Inherits Crystal::Macros::ASTNode
A method definition.
Instance methods
annotation(type : TypeNode) : Annotation | NilLiteral
Returns the last Annotation with the given type
attached to this method or NilLiteral if there are none.
annotations(type : TypeNode) : ArrayLiteral(Annotation)
Returns an array of annotations with the given type
attached to this method, or an empty ArrayLiteral if there are none.
annotations
Returns an array of all annotations attached to this
method, or an empty ArrayLiteral if there are none.
free_vars
Returns the free variables of this method, or an empty ArrayLiteral if
there are none.
receiver
Returns the receiver (for example self) of this method definition,
or Nop if not specified.