Class: ReqWrap::HttpFeatures::ResponseStore
- Inherits:
-
HTTP::Feature
- Object
- HTTP::Feature
- ReqWrap::HttpFeatures::ResponseStore
- Defined in:
- lib/req_wrap/http_features/response_store.rb
Instance Method Summary collapse
-
#initialize(store:) ⇒ ResponseStore
constructor
A new instance of ResponseStore.
- #wrap_response(response) ⇒ Object
Constructor Details
#initialize(store:) ⇒ ResponseStore
Returns a new instance of ResponseStore.
8 9 10 11 12 13 14 |
# File 'lib/req_wrap/http_features/response_store.rb', line 8 def initialize(store:) super() raise ArgumentError, 'Provide data structure to store responses' unless store @store = store end |
Instance Method Details
#wrap_response(response) ⇒ Object
16 17 18 19 20 |
# File 'lib/req_wrap/http_features/response_store.rb', line 16 def wrap_response(response) @store.append(response) response end |