Class: Shortlook::CLI

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

Constant Summary collapse

Error =
Class.new(StandardError)

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.destination_rootObject



22
23
24
# File 'lib/shortlook/cli.rb', line 22

def self.destination_root
  File.dirname(__FILE__)
end

.source_rootObject



18
19
20
# File 'lib/shortlook/cli.rb', line 18

def self.source_root
  File.dirname(__FILE__)
end

Instance Method Details

#provider(name) ⇒ Object



57
58
59
60
61
62
# File 'lib/shortlook/cli.rb', line 57

def provider(name)
  require_relative 'commands/provider'
  @config = Shortlook::Commands::Provider.new(name).execute

  directory('templates/provider', provider_name)
end

#versionObject



12
13
14
15
# File 'lib/shortlook/cli.rb', line 12

def version
  require_relative 'version'
  puts "v#{Shortlook::VERSION}"
end