module Crygen::Modules::Annotation

Overview

Module that is used to store and add the annotations.

Included Modules

Direct including types

Defined in:

modules/annotation.cr

Instance Method Summary

Instance methods inherited from module Crygen::Helpers::Annotation

add_link(name : String) : self add_link, as_deprecated(message : String) : self
as_deprecated : self
as_deprecated
, as_experimental(message : String) : self
as_experimental : self
as_experimental
, as_flags : self as_flags

Instance Method Detail

def add_annotation(annotation_type : Crygen::Types::Annotation) : self #

Adds annotation(s) onto object. Example:

class_type = CGT::Class.new("Person")
class_type.add_annotation(CGT::Annotation.new("Experimental"))
class_type.add_annotation(CGT::Annotation.new("AnotherAnnotation"))

Output:

@[Experimental]
@[AnotherAnnotation]
class Person
end

[View source]