Class: Boothby::CLI

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

Overview

Handle the application command line parsing and the dispatch to various command objects

Constant Summary collapse

Error =

Error raised by this runner

Class.new(StandardError)

Instance Method Summary collapse

Instance Method Details

#seedObject



26
27
28
29
30
31
32
33
# File 'lib/boothby/cli.rb', line 26

def seed(*)
  if options[:help]
    invoke(:help, ['seed'])
  else
    require_relative('commands/seed')
    Boothby::Commands::Seed.new(options).execute
  end
end

#setupObject



54
55
56
57
58
59
60
61
# File 'lib/boothby/cli.rb', line 54

def setup(*)
  if options[:help]
    invoke(:help, ['setup'])
  else
    require_relative('commands/setup')
    Boothby::Commands::Setup.new(options).execute
  end
end

#updateObject



40
41
42
43
44
45
46
47
# File 'lib/boothby/cli.rb', line 40

def update(*)
  if options[:help]
    invoke(:help, ['update'])
  else
    require_relative('commands/update')
    Boothby::Commands::Update.new(options).execute
  end
end

#versionObject



15
16
17
18
# File 'lib/boothby/cli.rb', line 15

def version
  require_relative('version')
  puts("v#{Boothby::VERSION}")
end