Class: RubyScraper
- Inherits:
-
Object
- Object
- RubyScraper
- Defined in:
- lib/rubyscraper.rb,
lib/rubyscraper/binary.rb,
lib/rubyscraper/version.rb
Defined Under Namespace
Classes: Binary
Constant Summary collapse
- VERSION =
"0.9.0"
Class Method Summary collapse
Class Method Details
.call(opts) ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/rubyscraper.rb', line 6 def self.call(opts) record_limit = opts.record_limit config_file = File.(opts.config_file, Dir.pwd) single_site = opts.single_site scrape_delay = opts.scrape_delay endpoint = opts.endpoint processor = Processor.new(config_file, single_site, record_limit, scrape_delay) results = processor.call num_saved = ApiDispatcher.post(results, endpoint) return results.count, num_saved end |