Class: Net::HTTP

Inherits:
Object
  • Object
show all
Defined in:
lib/socksify/http.rb

Defined Under Namespace

Modules: SOCKSProxyDelta

Class Method Summary collapse

Class Method Details

.SOCKSProxy(p_host, p_port) ⇒ Object


24
25
26
27
28
29
30
31
32
33
34
35
# File 'lib/socksify/http.rb', line 24

def self.SOCKSProxy(p_host, p_port)
  delta = SOCKSProxyDelta
  proxyclass = Class.new(self)
  proxyclass.send(:include, delta)
  proxyclass.module_eval {
    include delta::InstanceMethods
    extend delta::ClassMethods
    @socks_server = p_host
    @socks_port = p_port
  }
  proxyclass
end