Class: Guides::CLI
- Inherits:
-
Thor
- Object
- Thor
- Guides::CLI
- Defined in:
- lib/guides/cli.rb
Constant Summary collapse
- ASSETS_ROOT =
File.("../assets", __FILE__)
- SOURCE_ROOT =
File.("../source", __FILE__)
Instance Method Summary collapse
Instance Method Details
#generate ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/guides/cli.rb', line 18 def generate FileUtils.rm_rf("#{Guides.root}/output") if [:clean] require "guides/generator" opts = .dup opts[:only] ||= [] generator = Guides::Generator.new(opts) generator.generate end |
#new(name) ⇒ Object
11 12 13 |
# File 'lib/guides/cli.rb', line 11 def new(name) invoke "guides:new:copy", [name, [:name] || name] end |
#preview ⇒ Object
31 32 33 |
# File 'lib/guides/cli.rb', line 31 def preview end |