Class: TodoAgent::CLI

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

#analyze(path = ".") ⇒ Object



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

def analyze(path = ".")
  if options[:help]
    invoke :help, ["analyze"]
  else
    require_relative "commands/analyze"
    TodoAgent::Commands::Analyze.new(path, options).execute
  end
end

#versionObject



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

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