Crystal::Macros::Arg
Inherits Crystal::Macros::ASTNode
A def argument.
Instance methods
annotation(type : TypeNode) : Annotation | NilLiteral
Returns the last Annotation with the given type
attached to this arg or NilLiteral if there are none.
annotations(type : TypeNode) : ArrayLiteral(Annotation)
Returns an array of annotations with the given type
attached to this arg, or an empty ArrayLiteral if there are none.
annotations
Returns an array of all annotations attached to this
arg, or an empty ArrayLiteral if there are none.
internal_name
Returns the internal name of this argument.
For example, for def write(to file) returns file.
name
Returns the external name of this argument.
For example, for def write(to file) returns to.