Class: Paratrooper::HttpClientWrapper
- Inherits:
-
Object
- Object
- Paratrooper::HttpClientWrapper
- Defined in:
- lib/paratrooper/http_client_wrapper.rb
Instance Attribute Summary collapse
-
#http_client ⇒ Object
readonly
Returns the value of attribute http_client.
Instance Method Summary collapse
- #get(url) ⇒ Object
-
#initialize(options = {}) ⇒ HttpClientWrapper
constructor
A new instance of HttpClientWrapper.
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( = {}) @http_client= [:http_client] || Excon end |
Instance Attribute Details
#http_client ⇒ Object (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 |