Class: Squareone::Cli
- Inherits:
-
Thor
- Object
- Thor
- Squareone::Cli
- Defined in:
- lib/squareone/cli.rb
Class Method Summary collapse
Instance Method Summary collapse
- #new(path) ⇒ Object
-
#version ⇒ Object
Display gem USAGE: squareone -v.
Class Method Details
.exit_on_failure? ⇒ Boolean
27 28 29 |
# File 'lib/squareone/cli.rb', line 27 def self.exit_on_failure? true end |
Instance Method Details
#new(path) ⇒ Object
16 17 18 19 20 21 22 23 24 25 |
# File 'lib/squareone/cli.rb', line 16 def new(path) project_root = File.(path) raise Error, set_color("ERROR: #{path} already exists.", :red) if File.exist?(path) say set_color("Creating project #{path}...", :green) generator = Squareone::Generator.new generator.destination_root = project_root generator.invoke_all end |