Class: HttpCrawler::Proxy::Client

Inherits:
Client
  • Object
show all
Defined in:
lib/http_crawler/proxy/client.rb

Direct Known Subclasses

TestProxyApi::Client

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.for(web_name, *arg) ⇒ Object

接收格式 web_name = "test_proxy_api" 返回 HttpCrawler::Proxy::TestProxyApi::Client 实例



11
12
13
# File 'lib/http_crawler/proxy/client.rb', line 11

def for(web_name, *arg)
  "HttpCrawler::Proxy::#{web_name.camelize}::Client".constantize.new(*arg)
end

Instance Method Details

#max_error_num ⇒ Object



17
18
19
# File 'lib/http_crawler/proxy/client.rb', line 17

def max_error_num
  @max_error_num ||= 0
end