Class: Bookshop::Generators::AppGenerator
- Inherits:
-
Thor::Group
- Object
- Thor::Group
- Bookshop::Generators::AppGenerator
- Includes:
- Thor::Actions
- Defined in:
- lib/bookshop/generators/bookshop/app/app_generator.rb
Overview
Thor based generator for creating new projects based upon a template project which is copied into the name_of_book project-folder when ‘build new name_of_book’ is issued
Class Method Summary collapse
-
.source_root ⇒ Object
Define source root of application.
Instance Method Summary collapse
-
#create_base_project ⇒ Object
Create the project from templates.
Class Method Details
.source_root ⇒ Object
Define source root of application
15 16 17 |
# File 'lib/bookshop/generators/bookshop/app/app_generator.rb', line 15 def self.source_root File.dirname(__FILE__) end |
Instance Method Details
#create_base_project ⇒ Object
Create the project from templates
21 22 23 24 25 |
# File 'lib/bookshop/generators/bookshop/app/app_generator.rb', line 21 def create_base_project raise GeneratorArgumentsError if app_path.nil? puts "creating base project" directory "templates", "#{app_path}" end |