Class: RubyScraper::Binary

Inherits:
Object
  • Object
show all
Defined in:
lib/rubyscraper/binary.rb

Class Method Summary collapse

Class Method Details

.call(argv, outstream, errstream) ⇒ Object



6
7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/rubyscraper/binary.rb', line 6

def self.call(argv, outstream, errstream)
  outstream.puts "RubyScraper"
  outstream.puts "---------------------------------------------"
  outstream.puts "Started scraping..."
  outstream.puts "---------------------------------------------"

  options = OptparseExample.parse(argv)
  records_scraped, records_saved = RubyScraper.call(options)

  outstream.puts "---------------------------------------------"
  outstream.puts "Scraped #{records_scraped} records, succesfully posted #{records_saved} records."
  outstream.puts "---------------------------------------------"
  outstream.puts "Completed!"
end