Class: NetHTTPFetcher
- Inherits:
-
Object
- Object
- NetHTTPFetcher
- Defined in:
- lib/yadis/fetcher.rb
Instance Attribute Summary collapse
-
#ca_path ⇒ Object
Returns the value of attribute ca_path.
Instance Method Summary collapse
- #get(url, params = nil) ⇒ Object
-
#initialize(read_timeout = 20, open_timeout = 20) ⇒ NetHTTPFetcher
constructor
A new instance of NetHTTPFetcher.
Constructor Details
#initialize(read_timeout = 20, open_timeout = 20) ⇒ NetHTTPFetcher
Returns a new instance of NetHTTPFetcher.
16 17 18 19 20 |
# File 'lib/yadis/fetcher.rb', line 16 def initialize(read_timeout=20, open_timeout=20) @read_timeout = read_timeout @open_timeout = open_timeout @ca_path = nil end |
Instance Attribute Details
#ca_path ⇒ Object
Returns the value of attribute ca_path.
14 15 16 |
# File 'lib/yadis/fetcher.rb', line 14 def ca_path @ca_path end |
Instance Method Details
#get(url, params = nil) ⇒ Object
22 23 24 25 26 27 28 29 |
# File 'lib/yadis/fetcher.rb', line 22 def get(url, params = nil) resp, final_url = do_get(url, params) if resp.nil? nil else [final_url, resp] end end |