Class: Textoken::LessThan
- Inherits:
-
Object
- Object
- Textoken::LessThan
- Includes:
- NumericOption
- Defined in:
- lib/textoken/options/less_than.rb
Overview
This option object picks words in text with less than length of the option value
Instance Attribute Summary
Attributes included from NumericOption
Instance Method Summary collapse
Methods included from NumericOption
#initialize, #priority, #tokenize_if, #validate
Instance Method Details
#tokenize(base) ⇒ Object
7 8 9 10 |
# File 'lib/textoken/options/less_than.rb', line 7 def tokenize(base) @base = base tokenize_if { |word| word.length < number } end |