class
Crygen::Types::Alias
- Crygen::Types::Alias
- Crygen::Interfaces::GeneratorInterface
- Reference
- Object
Overview
Class that is used to generate the aliases.
alias_type = CGT::Alias.new("MyAlias", %w[Foo Bar])
puts alias_type.generate
Output:
alias MyAlias = Foo | Bar
Included Modules
Defined in:
types/alias.crConstructors
-
.new(name : String, types : Array(String))
The alias name and types to pass to the constructor.
Instance Method Summary
-
#generate : String
Generates an alias.
-
#to_s(io : IO) : Nil
Generates an alias.
Instance methods inherited from module Crygen::Modules::Comment
add_comment(value : String) : self
add_comment
Instance methods inherited from class Crygen::Interfaces::GeneratorInterface
generate : String
generate
Constructor Detail
def self.new(name : String, types : Array(String))
#
The alias name and types to pass to the constructor.