lib/httpx/plugins/proxy.rb in httpx-0.15.4 vs lib/httpx/plugins/proxy.rb in httpx-0.16.0
- old
+ new
@@ -62,16 +62,14 @@
def configure(klass)
klass.plugin(:"proxy/http")
klass.plugin(:"proxy/socks4")
klass.plugin(:"proxy/socks5")
end
+ end
- def extra_options(options)
- Class.new(options.class) do
- def_option(:proxy, <<-OUT)
- value.is_a?(#{Parameters}) ? value : Hash[value]
- OUT
- end.new(options)
+ module OptionsMethods
+ def option_proxy(value)
+ value.is_a?(Parameters) ? value : Hash[value]
end
end
module InstanceMethods
private