module Crygen::Modules::Annotation

Overview

Module that is used to store and add the annotations.

Direct including types

Defined in:

modules/annotation.cr

Instance Method Summary

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

Returns: an object class itself.


[View source]