Class: HTTP::WebMockPerform
- Inherits:
-
Object
- Object
- HTTP::WebMockPerform
- Defined in:
- lib/webmock/http_lib_adapters/http_rb/webmock.rb
Instance Method Summary collapse
- #exec ⇒ Object
-
#initialize(request, options, &perform) ⇒ WebMockPerform
constructor
A new instance of WebMockPerform.
- #request_signature ⇒ Object
Constructor Details
#initialize(request, options, &perform) ⇒ WebMockPerform
Returns a new instance of WebMockPerform.
5 6 7 8 9 10 |
# File 'lib/webmock/http_lib_adapters/http_rb/webmock.rb', line 5 def initialize(request, , &perform) @request = request @options = @perform = perform @request_signature = nil end |
Instance Method Details
#exec ⇒ Object
12 13 14 |
# File 'lib/webmock/http_lib_adapters/http_rb/webmock.rb', line 12 def exec replay || perform || halt end |
#request_signature ⇒ Object
16 17 18 19 20 21 22 23 |
# File 'lib/webmock/http_lib_adapters/http_rb/webmock.rb', line 16 def request_signature unless @request_signature @request_signature = @request.webmock_signature register_request(@request_signature) end @request_signature end |