Class: Datahen::CLI::ScraperVar
- Inherits:
-
Thor
- Object
- Thor
- Datahen::CLI::ScraperVar
- Defined in:
- lib/datahen/cli/scraper_var.rb
Class Method Summary collapse
Instance Method Summary collapse
- #list(scraper_name) ⇒ Object
- #set(scraper_name, var_name, value) ⇒ Object
- #show(scraper_name, var_name) ⇒ Object
- #unset(scraper_name, var_name) ⇒ Object
Class Method Details
.banner(command, namespace = nil, subcommand = false) ⇒ Object
6 7 8 |
# File 'lib/datahen/cli/scraper_var.rb', line 6 def self.(command, namespace = nil, subcommand = false) "#{basename} #{@package_name} #{command.usage}" end |
Instance Method Details
#list(scraper_name) ⇒ Object
16 17 18 19 |
# File 'lib/datahen/cli/scraper_var.rb', line 16 def list(scraper_name) client = Client::ScraperVar.new() puts "#{client.all(scraper_name)}" end |
#set(scraper_name, var_name, value) ⇒ Object
28 29 30 31 32 |
# File 'lib/datahen/cli/scraper_var.rb', line 28 def set(scraper_name, var_name, value) # puts "options #{options}" client = Client::ScraperVar.new() puts "#{client.set(scraper_name, var_name, value, )}" end |
#show(scraper_name, var_name) ⇒ Object
35 36 37 38 |
# File 'lib/datahen/cli/scraper_var.rb', line 35 def show(scraper_name, var_name) client = Client::ScraperVar.new() puts "#{client.find(scraper_name, var_name)}" end |
#unset(scraper_name, var_name) ⇒ Object
41 42 43 44 |
# File 'lib/datahen/cli/scraper_var.rb', line 41 def unset(scraper_name, var_name) client = Client::ScraperVar.new() puts "#{client.unset(scraper_name, var_name)}" end |