Class: WonderScrape::CLI

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

#scrapeObject



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

def scrape(*)
  if options[:help]
    invoke :help, ['scrape']
  else
    WonderScrape::Commands::Scrape.new(options).execute
  end
end

#versionObject



16
17
18
19
# File 'lib/wonder_scrape/cli.rb', line 16

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