Class: AnswersEngine::CLI::ScraperJob

Inherits:
Thor
  • Object
show all
Defined in:
lib/answersengine/cli/scraper_job.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details



5
6
7
# File 'lib/answersengine/cli/scraper_job.rb', line 5

def self.banner(command, namespace = nil, subcommand = false)
  "#{basename} #{@package_name} #{command.usage}"
end

Instance Method Details

#cancel(scraper_name) ⇒ Object



32
33
34
35
# File 'lib/answersengine/cli/scraper_job.rb', line 32

def cancel(scraper_name)
  client = Client::ScraperJob.new(options)
  puts "#{client.cancel(scraper_name)}"
end

#list(scraper_name) ⇒ Object



22
23
24
25
# File 'lib/answersengine/cli/scraper_job.rb', line 22

def list(scraper_name)
  client = Client::ScraperJob.new(options)
  puts "#{client.all(scraper_name)}"
end

#pause(scraper_name) ⇒ Object



50
51
52
53
# File 'lib/answersengine/cli/scraper_job.rb', line 50

def pause(scraper_name)
  client = Client::ScraperJob.new(options)
  puts "#{client.pause(scraper_name)}"
end

#resume(scraper_name) ⇒ Object



41
42
43
44
# File 'lib/answersengine/cli/scraper_job.rb', line 41

def resume(scraper_name)
  client = Client::ScraperJob.new(options)
  puts "#{client.resume(scraper_name)}"
end

#show(scraper_name) ⇒ Object



10
11
12
13
# File 'lib/answersengine/cli/scraper_job.rb', line 10

def show(scraper_name)
  client = Client::ScraperJob.new(options)
  puts "#{client.find(scraper_name)}"
end

#update(scraper_name) ⇒ Object



63
64
65
66
# File 'lib/answersengine/cli/scraper_job.rb', line 63

def update(scraper_name)
  client = Client::ScraperJob.new(options)
  puts "#{client.update(scraper_name, options)}"
end