lib/inquisitio/searcher.rb in inquisitio-1.2.3 vs lib/inquisitio/searcher.rb in inquisitio-1.2.4
- old
+ new
@@ -1,7 +1,6 @@
require 'excon'
-require "deep_clone"
module Inquisitio
class Searcher
def self.method_missing(name, *args)
@@ -162,10 +161,15 @@
)
end
end
def clone
- Searcher.new(DeepClone.clone(params)) do |s|
+ params_clone = JSON.parse(params.to_json)
+ symbolised_params = params_clone.inject({}) do |h, (key, value)|
+ h[key.to_sym] = value
+ h
+ end
+ Searcher.new(symbolised_params) do |s|
yield(s) if block_given?
end
end
end
end