Class: HideMyAss::ProxyList
- Inherits:
-
Object
- Object
- HideMyAss::ProxyList
- Extended by:
- Forwardable
- Includes:
- Enumerable
- Defined in:
- lib/hidemyass/proxy_list.rb
Overview
Represent a list of proxies that match the specified search properties.
Instance Attribute Summary collapse
-
#form_data ⇒ Hash
Form data to support custom searches.
Instance Method Summary collapse
-
#initialize(form_data = HideMyAss.form_data) ⇒ HideMyAss::ProxyList
constructor
Represent a list of proxies that match the specified search properties.
-
#uri ⇒ URI
Build URI for endpoint including all search form params.
Constructor Details
#initialize(form_data = HideMyAss.form_data) ⇒ HideMyAss::ProxyList
Represent a list of proxies that match the specified search properties.
29 30 31 32 |
# File 'lib/hidemyass/proxy_list.rb', line 29 def initialize(form_data = HideMyAss.form_data) self.form_data = form_data.reject { |_, v| v.nil? } @proxies = fetch end |
Instance Attribute Details
#form_data ⇒ Hash
Form data to support custom searches
39 40 41 |
# File 'lib/hidemyass/proxy_list.rb', line 39 def form_data @form_data end |
Instance Method Details
#uri ⇒ URI
Build URI for endpoint including all search form params.
44 45 46 47 48 |
# File 'lib/hidemyass/proxy_list.rb', line 44 def uri uri = URI(ENDPOINT) uri.query = URI.encode_www_form(form_data) uri end |