Class: Cruncher::CLI

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

#scan(url) ⇒ Object



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

def scan(url)
  if options[:help]
    invoke :help, ['scan']
  else
    require_relative 'commands/scan'
    Cruncher::Commands::Scan.new(url, options).execute
  end
end

#versionObject



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

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