Module: Proxifier::EnvironmentProxify
- Included in:
- TCPSocket
- Defined in:
- lib/proxifier/env.rb
Defined Under Namespace
Modules: ClassMethods
Class Method Summary collapse
Instance Method Summary collapse
- #environment_no_proxy ⇒ Object
- #environment_proxy ⇒ Object
- #initialize_with_environment_proxy(host, port, options_or_local_host = {}, local_port = nil, options_if_local_host = {}) ⇒ Object
Class Method Details
.included(klass) ⇒ Object
54 55 56 57 58 59 60 |
# File 'lib/proxifier/env.rb', line 54 def self.included(klass) klass.class_eval do extend ClassMethods alias_method :initialize_without_environment_proxy, :initialize alias_method :initialize, :initialize_with_environment_proxy end end |
Instance Method Details
#environment_no_proxy ⇒ Object
79 80 81 |
# File 'lib/proxifier/env.rb', line 79 def environment_no_proxy self.class.environment_no_proxy end |
#environment_proxy ⇒ Object
75 76 77 |
# File 'lib/proxifier/env.rb', line 75 def environment_proxy self.class.environment_proxy end |
#initialize_with_environment_proxy(host, port, options_or_local_host = {}, local_port = nil, options_if_local_host = {}) ⇒ Object
62 63 64 65 66 67 68 69 70 71 72 73 |
# File 'lib/proxifier/env.rb', line 62 def initialize_with_environment_proxy(host, port, = {}, local_port = nil, = {}) if .is_a?(Hash) local_host = nil = else local_host = = end = { :proxy => environment_proxy, :no_proxy => environment_no_proxy }.merge() initialize_without_environment_proxy(host, port, local_host, local_port, ) end |