Skip to content

module Crystal::Annotatable

Direct including types

Crystal::Def Crystal::Macro Crystal::MetaTypeVar Crystal::Type

Methods

#add_annotation(annotation_type : AnnotationType, value : Annotation)

Adds an annotation with the given type and value

View source

#annotation(annotation_type) : Annotation?

Returns the last defined annotation with the given type, if any, or nil otherwise

View source

#annotations(annotation_type) : Array(Annotation)?

Returns all annotations with the given type, if any, or nil otherwise

View source

#annotations : Hash(AnnotationType, Array(Annotation))?

Annotations on this instance

View source

#annotations=(annotations : Hash(AnnotationType, Array(Annotation))?)

Annotations on this instance

View source