Class: Datahen::CLI::ScraperVar

Inherits:
Thor
  • Object
show all
Defined in:
lib/datahen/cli/scraper_var.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details



6
7
8
# File 'lib/datahen/cli/scraper_var.rb', line 6

def self.banner(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(options)
  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(options)
  puts "#{client.set(scraper_name, var_name, value, options)}"
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(options)
  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(options)
  puts "#{client.unset(scraper_name, var_name)}"
end