Class: Paratrooper::HttpClientWrapper

Inherits:
Object
  • Object
show all
Defined in:
lib/paratrooper/http_client_wrapper.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ HttpClientWrapper

Returns a new instance of HttpClientWrapper.



5
6
7
# File 'lib/paratrooper/http_client_wrapper.rb', line 5

def initialize(options = {})
  @http_client= options[:http_client] || Excon
end

Instance Attribute Details

#http_clientObject (readonly)

Returns the value of attribute http_client.



3
4
5
# File 'lib/paratrooper/http_client_wrapper.rb', line 3

def http_client
  @http_client
end

Instance Method Details

#get(url) ⇒ Object



9
10
11
# File 'lib/paratrooper/http_client_wrapper.rb', line 9

def get(url)
  http_client.get(url)
end