Class: NetHTTPFetcher

Inherits:
Object
  • Object
show all
Defined in:
lib/yadis/fetcher.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_pathObject

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