lib/httpx/plugins/proxy.rb in httpx-0.13.2 vs lib/httpx/plugins/proxy.rb in httpx-0.14.0

- old
+ new

@@ -65,16 +65,12 @@ klass.plugin(:"proxy/socks5") end def extra_options(options) Class.new(options.class) do - def_option(:proxy) do |pr| - if pr.is_a?(Parameters) - pr - else - Hash[pr] - end - end + def_option(:proxy, <<-OUT) + value.is_a?(#{Parameters}) ? value : Hash[value] + OUT end.new(options) end end module InstanceMethods