Class: WebCrawler::HandlerParser

Inherits:
Handler
  • Object
show all
Defined in:
lib/web_crawler/handler.rb

Instance Method Summary collapse

Methods inherited from Handler

#process

Constructor Details

#initialize(parser, *responses_or_request) ⇒ HandlerParser

Returns a new instance of HandlerParser.



23
24
25
26
# File 'lib/web_crawler/handler.rb', line 23

def initialize(parser, *responses_or_request)
  @parser = load_parser(parser)
  super(*responses_or_request, &lambda { |response,*| @parser.parse(response) })
end