Class: Coppy::CLI

Inherits:
Thor
  • Object
show all
Includes:
Thor::Actions
Defined in:
lib/coppy/cli.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.exit_on_failure?Boolean

Returns:

  • (Boolean)


9
10
11
# File 'lib/coppy/cli.rb', line 9

def self.exit_on_failure?
  true
end

Instance Method Details

#copy(template_path, target_path) ⇒ Object



14
15
16
17
18
19
# File 'lib/coppy/cli.rb', line 14

def copy(template_path, target_path)
  Runner.new(template_path, target_path).call
rescue Coppy::Manifesto::InvalidManifesto => e
  say "Failed to load manifesto. #{e.message}"
  exit(1)
end