Class: Boxybox::CLI

Inherits:
Thor
  • Object
show all
Defined in:
lib/boxybox/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

#boxes(input = nil) ⇒ Object



32
33
34
35
36
37
38
39
# File 'lib/boxybox/cli.rb', line 32

def boxes(input = nil)
  if options[:help]
    invoke :help, ['boxes']
  else
    require_relative 'commands/boxes'
    Boxybox::Commands::Boxes.new(input, options).execute
  end
end

#versionObject



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

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