Module: RSolr::Char

Included in:
RSolr
Defined in:
lib/rsolr.rb

Overview

A module that contains string related methods

Instance Method Summary collapse

Instance Method Details

#escape(value) ⇒ Object

escape - from the solr-ruby library RSolr.escape(‘asdf’) backslash everything that isn’t a word character



33
34
35
# File 'lib/rsolr.rb', line 33

def escape(value)
  value.gsub(/(\W)/, '\\\\\1')
end