Class: Net::HTTP
- Inherits:
-
Object
- Object
- Net::HTTP
- Defined in:
- lib/vcr/library_hooks/fakeweb.rb
Instance Method Summary collapse
- #request_with_vcr(request, *args, &block) ⇒ Object (also: #request)
Instance Method Details
#request_with_vcr(request, *args, &block) ⇒ Object Also known as: request
158 159 160 161 162 163 164 165 166 167 168 |
# File 'lib/vcr/library_hooks/fakeweb.rb', line 158 def request_with_vcr(request, *args, &block) if VCR.turned_on? handler = request.instance_eval do remove_instance_variable(:@__vcr_request_handler) if defined?(@__vcr_request_handler) end || VCR::LibraryHooks::FakeWeb::RequestHandler.new(self, request, *args, &block) handler.handle else request_without_vcr(request, *args, &block) end end |