Class: DaimonSkycrawlers::Processor::Default
- Defined in:
- lib/daimon_skycrawlers/processor/default.rb
Overview
Very simple processor
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#call(message) ⇒ Object
Display page information.
Methods inherited from Base
Methods included from Configurable
Methods included from Callbacks
#after_process, #before_process, #clear_after_process_callbacks, #clear_before_process_callbacks, #run_after_process_callbacks, #run_before_process_callbacks
Constructor Details
This class inherits a constructor from DaimonSkycrawlers::Processor::Base
Instance Method Details
#call(message) ⇒ Object
Display page information
13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/daimon_skycrawlers/processor/default.rb', line 13 def call() page = storage.read() headers = JSON.parse(page.headers) headers_string = headers.map {|key, value| " #{key}: #{value}" }.join("\n") = <<LOG URL: #{page.url} Body: #{page.body.bytesize} bytes Headers: #{headers_string} LOG log.info() end |