Class | Scrubyt::PostProcessor |
In: |
lib/scrubyt/output/post_processor.rb
|
Parent: | Object |
Some things can not be carried out during evaluation - for example the ensure_presence_of_pattern constraint (since the evaluation is top to bottom, at a given point we don‘t know yet whether the currently evaluated pattern will have a child pattern or not) or removing unneeded results caused by evaluating multiple filters.
The sole purpose of this class is to execute these post-processing tasks.
Remove unneeded results of a pattern (caused by evaluating multiple filters) See for example the B&N scenario - the book titles are extracted two times for every pattern (since both examples generate the same XPath for them) but since always only one of the results has a price, the other is discarded