Class: Datahen::CLI::ScraperResource
- Inherits:
-
Thor
- Object
- Thor
- Datahen::CLI::ScraperResource
- Defined in:
- lib/datahen/cli/scraper_resource.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.banner(command, namespace = nil, subcommand = false) ⇒ Object
5 6 7 |
# File 'lib/datahen/cli/scraper_resource.rb', line 5 def self.(command, namespace = nil, subcommand = false) "#{basename} #{@package_name} #{command.usage}" end |
Instance Method Details
#list ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/datahen/cli/scraper_resource.rb', line 18 def list() if [:job] client = Client::JobResource.new() puts "#{client.all([:job])}" else if [:scraper_name] client = Client::ScraperResource.new() puts "#{client.all([:scraper_name])}" else puts 'Must specify either a job ID or a scraper name' end end end |