A method definition.
Returns true
if this method can be called with a block, false
otherwise.
Returns the last Annotation
with the given type
attached to this variable or NilLiteral
if there are none.
Returns an array of annotations with the given type
attached to this variable, or an empty ArrayLiteral
if there are none.
Returns the arguments of this method.
Returns the block argument, if any.
Returns the body of this method.
Returns the double splat argument, if any.
Returns the name of this method.
Returns the receiver (for example self
) of this method definition, or Nop
if not specified.
Returns the return type of the method, if specified.
Returns the index of the argument with a *splat, if any.
Returns the visibility of this def: :public
, :protected
or :private
.
Crystal::Macros::ASTNode
Reference
Reference
Object
Object
Returns true
if this method can be called with a block, false
otherwise.
Returns the last Annotation
with the given type
attached to this variable or NilLiteral
if there are none.
Returns an array of annotations with the given type
attached to this variable, or an empty ArrayLiteral
if there are none.
Returns the arguments of this method.
Returns the receiver (for example self
) of this method definition, or Nop
if not specified.
Returns the index of the argument with a *splat, if any.
Returns the visibility of this def: :public
, :protected
or :private
.
© 2012–2020 Manas Technology Solutions.
Licensed under the Apache License, Version 2.0.
https://crystal-lang.org/api/0.35.1/Crystal/Macros/Def.html