module Proxifier::EnvironmentProxify
Public Class Methods
included(klass)
click to toggle source
# 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
Public Instance Methods
environment_no_proxy()
click to toggle source
# File lib/proxifier/env.rb, line 79 def environment_no_proxy self.class.environment_no_proxy end
environment_proxy()
click to toggle source
# 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 = {})
click to toggle source
# File lib/proxifier/env.rb, line 62 def initialize_with_environment_proxy(host, port, options_or_local_host = {}, local_port = nil, options_if_local_host = {}) if options_or_local_host.is_a?(Hash) local_host = nil options = options_or_local_host else local_host = options_or_local_host options = options_if_local_host end options = { :proxy => environment_proxy, :no_proxy => environment_no_proxy }.merge(options) initialize_without_environment_proxy(host, port, local_host, local_port, options) end