Sha256: 349ec135262cbdf06cbe200920c067b8ad92d95a91077c4fbe1a8064444fa2e3

Contents?: true

Size: 190 Bytes

Versions: 3

Compression:

Stored size: 190 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

3 entries across 3 versions & 1 rubygems

Version Path
acts_as_indexed-0.8.2 lib/acts_as_indexed/pre_tokenizer.rb
acts_as_indexed-0.8.1 lib/acts_as_indexed/pre_tokenizer.rb
acts_as_indexed-0.8.0 lib/acts_as_indexed/pre_tokenizer.rb