Method: Riddle::Query.escape
- Defined in:
- lib/riddle/query.rb
.escape(string) ⇒ Object
108 109 110 111 |
# File 'lib/riddle/query.rb', line 108 def self.escape(string) string.gsub(ESCAPE_CHARACTERS) { |match| "\\#{match}" } .gsub(ESCAPE_WORDS) { |word| "\\#{word}" } end |