Class: Basilisk::ErrorProcessor

Inherits:
CSVProcessor show all
Defined in:
lib/basilisk/processors/error_processor.rb

Overview

Stores page errors.

Instance Method Summary collapse

Methods inherited from CSVProcessor

#write_file

Methods inherited from Processor

#close_file

Constructor Details

#initialize(search_name) ⇒ ErrorProcessor

Returns a new instance of ErrorProcessor.



5
6
7
8
# File 'lib/basilisk/processors/error_processor.rb', line 5

def initialize(search_name)
  super
  save_header_row
end

Instance Method Details

#process_page(page, page_hash) ⇒ Object



10
11
12
# File 'lib/basilisk/processors/error_processor.rb', line 10

def process_page(page, page_hash)
  write_row(page, page_hash) if page.code != 200 && !page.redirect?
end