Class: Kawaii::Generators::NewProject

Inherits:
Thor::Group
  • Object
show all
Includes:
Thor::Actions
Defined in:
lib/kawaii/generators/new_project.rb

Constant Summary collapse

TEMPLATES_DIR =
'templates/new_project'.freeze

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.source_rootObject



12
13
14
# File 'lib/kawaii/generators/new_project.rb', line 12

def self.source_root
  File.dirname(__FILE__)
end

Instance Method Details

#create_app_folderObject



32
33
34
# File 'lib/kawaii/generators/new_project.rb', line 32

def create_app_folder
  empty_directory app_file_name
end

#create_application_rbObject



20
21
22
# File 'lib/kawaii/generators/new_project.rb', line 20

def create_application_rb
  template(application_template_location, application_file_name)
end

#create_config_ruObject



24
25
26
# File 'lib/kawaii/generators/new_project.rb', line 24

def create_config_ru
  template(config_ru_template_location, config_ru_file_name)
end

#create_gemfileObject



16
17
18
# File 'lib/kawaii/generators/new_project.rb', line 16

def create_gemfile
  template(gemfile_template_location, gemfile_file_name)
end

#create_routes_ruObject



28
29
30
# File 'lib/kawaii/generators/new_project.rb', line 28

def create_routes_ru
  template(routes_template_location, routes_file_name)
end