Class: VCR::LibraryHooks::FakeWeb::RequestHandler
- Inherits:
-
RequestHandler
- Object
- RequestHandler
- VCR::LibraryHooks::FakeWeb::RequestHandler
- Defined in:
- lib/vcr/library_hooks/fakeweb.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#net_http ⇒ Object
readonly
Returns the value of attribute net_http.
-
#request ⇒ Object
readonly
Returns the value of attribute request.
-
#request_body ⇒ Object
readonly
Returns the value of attribute request_body.
-
#response_block ⇒ Object
readonly
Returns the value of attribute response_block.
Instance Method Summary collapse
- #handle ⇒ Object
-
#initialize(net_http, request, request_body = nil, &response_block) ⇒ RequestHandler
constructor
A new instance of RequestHandler.
Methods included from VCR::Logger::Mixin
#log, #request_summary, #response_summary
Constructor Details
#initialize(net_http, request, request_body = nil, &response_block) ⇒ RequestHandler
Returns a new instance of RequestHandler.
17 18 19 20 21 |
# File 'lib/vcr/library_hooks/fakeweb.rb', line 17 def initialize(net_http, request, request_body = nil, &response_block) @net_http, @request, @request_body, @response_block = net_http, request, request_body, response_block @stubbed_response, @vcr_response, @recursing = nil, nil, false end |
Instance Attribute Details
#net_http ⇒ Object (readonly)
Returns the value of attribute net_http.
16 17 18 |
# File 'lib/vcr/library_hooks/fakeweb.rb', line 16 def net_http @net_http end |
#request ⇒ Object (readonly)
Returns the value of attribute request.
16 17 18 |
# File 'lib/vcr/library_hooks/fakeweb.rb', line 16 def request @request end |
#request_body ⇒ Object (readonly)
Returns the value of attribute request_body.
16 17 18 |
# File 'lib/vcr/library_hooks/fakeweb.rb', line 16 def request_body @request_body end |
#response_block ⇒ Object (readonly)
Returns the value of attribute response_block.
16 17 18 |
# File 'lib/vcr/library_hooks/fakeweb.rb', line 16 def response_block @response_block end |
Instance Method Details
#handle ⇒ Object
23 24 25 26 27 |
# File 'lib/vcr/library_hooks/fakeweb.rb', line 23 def handle super ensure invoke_after_request_hook(@vcr_response) unless @recursing end |