Class: Guides::CLI

Inherits:
Thor
  • Object
show all
Defined in:
lib/guides/cli.rb

Constant Summary collapse

ASSETS_ROOT =
File.expand_path("../assets", __FILE__)
SOURCE_ROOT =
File.expand_path("../source", __FILE__)

Instance Method Summary collapse

Instance Method Details

#generateObject



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 options[:clean]
  require "guides/generator"

  opts = options.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, options[:name] || name]
end

#previewObject



31
32
33
# File 'lib/guides/cli.rb', line 31

def preview

end