lib/mongoid/elasticsearch/utils.rb in mongoid-elasticsearch-0.2.1 vs lib/mongoid/elasticsearch/utils.rb in mongoid-elasticsearch-0.3.0
- old
+ new
@@ -2,19 +2,9 @@
require 'uri'
module Mongoid
module Elasticsearch
module Utils
-
- def escape(s)
- URI.encode_www_form_component(s.to_s)
- end
-
- def unescape(s)
- s = s.to_s.respond_to?(:force_encoding) ? s.to_s.force_encoding(Encoding::UTF_8) : s.to_s
- URI.decode_www_form_component(s)
- end
-
def clean(s)
s.to_s.gsub(/\W+/, ' ').gsub(/ +/, '').strip
end
extend self