Class: Basilisk::Processor

Inherits:
Object
  • Object
show all
Defined in:
lib/basilisk/processor.rb

Overview

Base class for page processors.

Direct Known Subclasses

CSVProcessor, SitemapProcessor

Instance Method Summary collapse

Constructor Details

#initialize(search_name) ⇒ Processor

Returns a new instance of Processor.



5
6
7
8
9
# File 'lib/basilisk/processor.rb', line 5

def initialize(search_name)
  @search_name   = search_name
  @base_folder   = Dir.pwd
  @output_folder = File.join(Dir.pwd, search_name)
end

Instance Method Details

#close_fileObject

Called when the crawl is completed.



15
16
# File 'lib/basilisk/processor.rb', line 15

def close_file
end

#process_page(page, page_hash) ⇒ Object



11
12
# File 'lib/basilisk/processor.rb', line 11

def process_page(page, page_hash)
end