module Typhoeus::Hydra::ConnectOptions::ClassMethods

def self.extended(base)

def self.extended(base)
  class << base
    attr_accessor :allow_net_connect
    attr_accessor :ignore_localhost
  end
  base.allow_net_connect = true
  base.ignore_localhost = false
end

def allow_net_connect?

Returns:
  • (boolean) - true/false
def allow_net_connect?
  allow_net_connect
end

def ignore_hosts

def ignore_hosts
  @ignore_hosts ||= []
  if ignore_localhost?
    @ignore_hosts + Typhoeus::Request::LOCALHOST_ALIASES
  else
    @ignore_hosts
  end
end

def ignore_hosts=(hosts)

def ignore_hosts=(hosts)
  @ignore_hosts = hosts
end

def ignore_localhost?

def ignore_localhost?
  ignore_localhost
end