Class: Nyanko::Generators::UnitGenerator

Inherits:
Rails::Generators::NamedBase
  • Object
show all
Defined in:
lib/generators/nyanko/unit/unit_generator.rb

Constant Summary collapse

ASSETS_TYPES =
%w[images javascripts stylesheets]

Instance Method Summary collapse

Instance Method Details

#create_unit_directoryObject



8
9
10
# File 'lib/generators/nyanko/unit/unit_generator.rb', line 8

def create_unit_directory
  empty_directory(directory)
end

#create_unit_fileObject



12
13
14
# File 'lib/generators/nyanko/unit/unit_generator.rb', line 12

def create_unit_file
  template("unit.rb.erb", "#{directory}/#{file_name}.rb")
end

#create_views_directoryObject



16
17
18
# File 'lib/generators/nyanko/unit/unit_generator.rb', line 16

def create_views_directory
  create_file("#{directory}/views/.gitkeep", "")
end