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
10 11 12 |
# File 'lib/grape/app/cli.rb', line 10 def self.source_root File.join(File.dirname(__FILE__), 'templates') end |
Instance Method Details
#copy_templates ⇒ Object
14 15 16 17 18 19 20 21 22 23 |
# File 'lib/grape/app/cli.rb', line 14 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
25 26 27 |
# File 'lib/grape/app/cli.rb', line 25 def init_lib empty_directory File.join(name, "lib", name) end |