Class DataHarvester::TextPortion
In: scripts/ad.rb
Parent: Object

Represents a portion of text from the original text of an ad. If this corresponds to a match, it also keeps track of the results.

Methods

<=>   new   split_on_rule   to_s  

Attributes

is_match  [R] 
pos  [R] 
txt  [R] 

Public Class methods

A TextPortion is made up of:

 txt - the unused piece of text itself
 pos - the position of this text within the ad

Public Instance methods

Sort by the position in the original text

Returns a hash of text portions for before the match, the match itself, and after the match. Also, adds the results to the ad.

Returns a String of this piece of text

[Validate]