Class: Koine::RestClient::Adapters::HttpPartyAdapter
- Inherits:
-
Object
- Object
- Koine::RestClient::Adapters::HttpPartyAdapter
- Defined in:
- lib/koine/rest_client/adapters/http_party_adapter.rb
Overview
adapter for HTTParty client
Instance Method Summary collapse
-
#initialize(http_party_client = HTTParty) ⇒ HttpPartyAdapter
constructor
A new instance of HttpPartyAdapter.
- #send_request(request) ⇒ Object
Constructor Details
#initialize(http_party_client = HTTParty) ⇒ HttpPartyAdapter
Returns a new instance of HttpPartyAdapter.
10 11 12 |
# File 'lib/koine/rest_client/adapters/http_party_adapter.rb', line 10 def initialize(http_party_client = HTTParty) @client = http_party_client end |
Instance Method Details
#send_request(request) ⇒ Object
14 15 16 |
# File 'lib/koine/rest_client/adapters/http_party_adapter.rb', line 14 def send_request(request) send("send_#{request.method}", request) end |