Class: Sumcli::CLI

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

#new(name) ⇒ Object



29
30
31
32
33
34
35
# File 'lib/sumcli/cli.rb', line 29

def new(name)
  if options[:help]
    invoke :help, ['new']
  else
    Sumcli::Commands::New.new(name, options).execute
  end
end

#versionObject



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

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