Class: Ur::Faraday::YieldUr
- Inherits:
-
Ur::FaradayMiddleware
- Object
- Faraday::Middleware
- Ur::FaradayMiddleware
- Ur::Faraday::YieldUr
- Defined in:
- lib/ur/faraday/yield_ur.rb
Overview
Faraday middleware which yields an Ur to the given block
Instance Attribute Summary
Attributes included from Middleware
Instance Method Summary collapse
-
#initialize(app, **options, &block) ⇒ YieldUr
constructor
A new instance of YieldUr.
Methods inherited from Ur::FaradayMiddleware
Methods included from Middleware
#begin_request, #finish_request, #invoke_callback
Constructor Details
#initialize(app, **options, &block) ⇒ YieldUr
Returns a new instance of YieldUr.
7 8 9 10 |
# File 'lib/ur/faraday/yield_ur.rb', line 7 def initialize(app, **, &block) raise(ArgumentError, "no block given to yield ur") unless block super(app, .merge(after_response: block)) end |