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



49
50
51
# File 'lib/rsolr.rb', line 49

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