Class: Makimono::Command::New
- Inherits:
-
Thor::Group
- Object
- Thor::Group
- Makimono::Command::New
- Includes:
- Thor::Actions
- Defined in:
- lib/makimono/command/new.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.source_root ⇒ Object
12 13 14 |
# File 'lib/makimono/command/new.rb', line 12 def self.source_root File.('../../project_template', __dir__) end |
Instance Method Details
#create_files ⇒ Object
20 21 22 23 24 25 |
# File 'lib/makimono/command/new.rb', line 20 def create_files copy_file('.gitignore') copy_file('Gemfile') template('makimono.yml', { name: name }) copy_file('src/01-Title.md', "src/01-#{name.capitalize}.md") end |
#run_bundle_install ⇒ Object
27 28 29 30 31 |
# File 'lib/makimono/command/new.rb', line 27 def run_bundle_install in_root do run('bundle install') end end |
#set_destination_root ⇒ Object
16 17 18 |
# File 'lib/makimono/command/new.rb', line 16 def set_destination_root self.destination_root = name end |