Class: Kanji::Generators::Type

Inherits:
AbstractGenerator show all
Defined in:
lib/kanji/generators/type.rb

Instance Method Summary collapse

Methods inherited from AbstractGenerator

#call

Constructor Details

#initialize(name, attributes) ⇒ Type

Returns a new instance of Type.



8
9
10
11
12
# File 'lib/kanji/generators/type.rb', line 8

def initialize(name, attributes)
  @name = name
  @attributes = attributes.map { |attr| attr.split(":") }
  super(destination)
end

Instance Method Details

#populate_templatesObject



14
15
16
17
18
19
# File 'lib/kanji/generators/type.rb', line 14

def populate_templates
  add_type
  add_repository
  add_mutations
  add_migration
end