Sha256: ed52cc1e5652a55c80b51e1ac886a60f8e22a8081ba4a17dbb7d90394952c037

Contents?: true

Size: 477 Bytes

Versions: 1

Compression:

Stored size: 477 Bytes

Contents

module HttpCrawler
  module Proxy

    include(HttpCrawler::Client)
    class << self

      # 接收格式
      # web_name = "test_proxy_api"
      # 返回 HttpCrawler::Proxy::TestProxyApi::Client 实例
      #
      def for(web_name, *arg)
        "HttpCrawler::Proxy::#{web_name.camelize}::Client".constantize.new(*arg)
      end

    end

    def max_error_num
      @max_error_num ||= 0
    end

  end
end

require_dependency File.dirname(__FILE__) + '/proxy/client.rb'

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
http_crawler-0.3.0.3 lib/http_crawler/proxy.rb