Class: Grape::App::CLI::Builder
- Inherits:
-
Thor::Group
- Object
- Thor::Group
- Grape::App::CLI::Builder
- Includes:
- Thor::Actions
- Defined in:
- lib/grape/app/cli.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.source_root ⇒ Object
9 10 11 |
# File 'lib/grape/app/cli.rb', line 9 def self.source_root File.join(File.dirname(__FILE__), 'templates') end |
Instance Method Details
#copy_templates ⇒ Object
13 14 15 16 17 18 19 20 21 22 |
# File 'lib/grape/app/cli.rb', line 13 def copy_templates prefix = File.join(self.class.source_root, '') Dir[File.join(self.class.source_root, '**', '*')].each do |file| next if File.directory?(file) file.sub! prefix, '' copy_file file, File.join(name, file) end end |
#init_lib ⇒ Object
24 25 26 |
# File 'lib/grape/app/cli.rb', line 24 def init_lib empty_directory File.join(name, 'lib', name) end |