Sha256: 26e5a94b80c4f28486ac283303c9912d5bdd56ca3fac55f98c86137740043a04

Contents?: true

Size: 193 Bytes

Versions: 2

Compression:

Stored size: 193 Bytes

Contents

module ActsAsIndexed
  class PreTokenizer

    # Strips all non-word characters and returns the resulting
    # string.
    def self.process(str)
      str.gsub(/[\W_]/,' ')
    end

  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
acts_as_indexed-0.9.0 lib/acts_as_indexed/pre_tokenizer.rb
acts_as_indexed-0.8.3 lib/acts_as_indexed/pre_tokenizer.rb