Class: URI::Generic
- Inherits:
-
Object
- Object
- URI::Generic
- Defined in:
- lib/aspera/proxy_auto_config.rb
Class Method Summary collapse
-
.register_proxy_finder {|url| ... } ⇒ Object
Register a custom proxy finder block.
Class Method Details
.register_proxy_finder {|url| ... } ⇒ Object
Register a custom proxy finder block
16 17 18 19 20 |
# File 'lib/aspera/proxy_auto_config.rb', line 16 def register_proxy_finder Aspera.assert(block_given?) # overload the method in URI : call user's provided block and fallback to original method define_method(:find_proxy){ |env_vars = ENV| yield(to_s) || find_proxy_orig(env_vars)} end |