lib/ezclient/request.rb in ezclient-1.3.0 vs lib/ezclient/request.rb in ezclient-1.4.0

- old
+ new

@@ -137,10 +137,15 @@ on_retry.call(self, error, options[:metadata]) yield end def timeout - options[:timeout]&.to_f + case options[:timeout] + when Hash + options[:timeout].transform_values! { |value| value&.to_f } + else + options[:timeout]&.to_f + end end def on_complete options[:on_complete] || proc {} end