Class: WebCrawler::Base

Inherits:
Object
  • Object
show all
Extended by:
ActiveSupport::Callbacks
Defined in:
lib/web_crawler/base.rb

Class Method Summary collapse

Class Method Details

.run(format = nil, format_options = { }) ⇒ Object



15
16
17
18
19
20
21
22
23
# File 'lib/web_crawler/base.rb', line 15

def run(format=nil, format_options={ })
  compile_targets
  self.responses = WebCrawler::BatchRequest.new(targets.to_a).process
  if format
    formated(process(responses), format, format_options)
  else
    process(responses)
  end
end