Class: Tango::ETL::HandlerInterface
- Inherits:
-
Object
- Object
- Tango::ETL::HandlerInterface
- Defined in:
- lib/tango/etl/handler_interface.rb
Overview
Handler interface
Instance Attribute Summary (collapse)
-
- (Object) url
readonly
Returns the value of attribute url.
Class Method Summary (collapse)
-
+ (Boolean) applicable?(url)
Wether handler should be applied for given url.
Instance Method Summary (collapse)
-
- (HandlerInterface) initialize(url, document, cache = nil)
constructor
Constructor of Tango's handler.
-
- (Array|String) links
Return list of links to be crawled as next.
-
- (NilClass) trigger
Process document.
Constructor Details
- (HandlerInterface) initialize(url, document, cache = nil)
Constructor of Tango's handler
15 16 17 18 19 |
# File 'lib/tango/etl/handler_interface.rb', line 15 def initialize( url, document, cache = nil ) @url = url @document = document @cache = cache end |
Instance Attribute Details
- (Object) url (readonly)
Returns the value of attribute url
10 11 12 |
# File 'lib/tango/etl/handler_interface.rb', line 10 def url @url end |
Class Method Details
+ (Boolean) applicable?(url)
Wether handler should be applied for given url
39 40 41 |
# File 'lib/tango/etl/handler_interface.rb', line 39 def self.applicable?( url ) raise NotImplementedError end |
Instance Method Details
- (Array|String) links
Return list of links to be crawled as next
24 25 26 |
# File 'lib/tango/etl/handler_interface.rb', line 24 def links raise NotImplementedError end |
- (NilClass) trigger
Process document
31 32 33 |
# File 'lib/tango/etl/handler_interface.rb', line 31 def trigger raise NotImplementedError end |