Class: HideMyAss::ProxyList

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Includes:
Enumerable
Defined in:
lib/hidemyass/proxy_list.rb

Overview

Represent a list of proxies that match the specified search properties.

Examples:

Iterate over all proxy server hosted in the US.

ProxyList.new { country == 'US'}.each { |proxy| ... }

List of all proxy server URLs

ProxyList.new.map(&:url)
# => ['https://178.22.148.122:3129']

Instance Method Summary collapse

Constructor Details

#initialize(&block) ⇒ HideMyAss::ProxyList

Represent a list of proxies that match the specified search properties.

Parameters:

  • block (Proc)

    Optional where clause to filter out proxies.



22
23
24
# File 'lib/hidemyass/proxy_list.rb', line 22

def initialize(&block)
  @proxies = fetch(&block)
end