Module: GSolr::Char

Included in:
GSolr
Defined in:
lib/gsolr.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 GSolr.escape(‘asdf’) backslash everything that isn’t a word character



23
24
25
# File 'lib/gsolr.rb', line 23

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