Class: VCR::LibraryHooks::FakeWeb::RecursiveRequestHandler
- Inherits:
-
RequestHandler
- Object
- RequestHandler
- RequestHandler
- VCR::LibraryHooks::FakeWeb::RecursiveRequestHandler
- Defined in:
- lib/vcr/library_hooks/fakeweb.rb
Instance Attribute Summary collapse
-
#stubbed_response ⇒ Object
readonly
Returns the value of attribute stubbed_response.
Attributes inherited from RequestHandler
#net_http, #request, #request_body, #response_block
Instance Method Summary collapse
- #handle ⇒ Object
-
#initialize(request_type, stubbed_response, vcr_request, *args, &response_block) ⇒ RecursiveRequestHandler
constructor
A new instance of RecursiveRequestHandler.
- #request_type(*args) ⇒ Object
Methods included from VCR::Logger::Mixin
#log, #request_summary, #response_summary
Constructor Details
#initialize(request_type, stubbed_response, vcr_request, *args, &response_block) ⇒ RecursiveRequestHandler
Returns a new instance of RecursiveRequestHandler.
132 133 134 135 136 |
# File 'lib/vcr/library_hooks/fakeweb.rb', line 132 def initialize(request_type, stubbed_response, vcr_request, *args, &response_block) @request_type, @stubbed_response, @vcr_request = request_type, stubbed_response, vcr_request super(*args) end |
Instance Attribute Details
#stubbed_response ⇒ Object (readonly)
Returns the value of attribute stubbed_response.
130 131 132 |
# File 'lib/vcr/library_hooks/fakeweb.rb', line 130 def stubbed_response @stubbed_response end |
Instance Method Details
#handle ⇒ Object
138 139 140 141 142 143 |
# File 'lib/vcr/library_hooks/fakeweb.rb', line 138 def handle set_typed_request_for_after_hook(@request_type) send "on_#{@request_type}_request" ensure invoke_after_request_hook(@vcr_response) end |
#request_type(*args) ⇒ Object
145 146 147 |
# File 'lib/vcr/library_hooks/fakeweb.rb', line 145 def request_type(*args) @request_type end |