Class: ActsAsIndexed::PreTokenizer
- Inherits:
-
Object
- Object
- ActsAsIndexed::PreTokenizer
- Defined in:
- lib/acts_as_indexed/pre_tokenizer.rb
Class Method Summary collapse
-
.process(str) ⇒ Object
Strips all non-word characters and returns the resulting string.
Class Method Details
.process(str) ⇒ Object
Strips all non-word characters and returns the resulting string.
6 7 8 |
# File 'lib/acts_as_indexed/pre_tokenizer.rb', line 6 def self.process(str) str.gsub(/[\W_]/,' ') end |