Class: Arstotzka::PostProcessor Private
- Inherits:
-
Object
- Object
- Arstotzka::PostProcessor
- Includes:
- Base
- Defined in:
- lib/arstotzka/post_processor.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Class reponsible for processing the result of Crawler#crawl.
PostProcessor proccess the whole collection and not individual results
Instance Attribute Summary collapse
- #options ⇒ Object readonly private private
Instance Method Summary collapse
-
#initialize(options_hash = {}) ⇒ PostProcessor
constructor
private
A new instance of PostProcessor.
-
#process(value) ⇒ Object
private
Apply transformation and filters on the result.
Methods included from Base
Constructor Details
#initialize(options_hash) ⇒ PostProcessor #initialize(options) ⇒ PostProcessor
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of PostProcessor.
81 82 83 |
# File 'lib/arstotzka/post_processor.rb', line 81 def initialize( = {}) self. = end |
Instance Attribute Details
#options ⇒ Object (readonly, private)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
101 102 103 |
# File 'lib/arstotzka/post_processor.rb', line 101 def @options end |
Instance Method Details
#process(value) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Apply transformation and filters on the result
91 92 93 94 95 96 97 |
# File 'lib/arstotzka/post_processor.rb', line 91 def process(value) value.flatten! if flatten && value.is_a?(Array) return value unless after instance.send(after, value) end |