Class: WebCrawler::HandlerParser
- Defined in:
- lib/web_crawler/handler.rb
Instance Method Summary collapse
-
#initialize(parser, *responses_or_request) ⇒ HandlerParser
constructor
A new instance of HandlerParser.
Methods inherited from Handler
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 |