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.
3 4 5 6 7 8 |
# File 'lib/webmock/http_lib_adapters/http_rb/webmock.rb', line 3 def initialize(request, , &perform) @request = request @options = @perform = perform @request_signature = nil end |
Instance Method Details
#exec ⇒ Object
10 11 12 |
# File 'lib/webmock/http_lib_adapters/http_rb/webmock.rb', line 10 def exec replay || perform || halt end |
#request_signature ⇒ Object
14 15 16 17 18 19 20 21 |
# File 'lib/webmock/http_lib_adapters/http_rb/webmock.rb', line 14 def request_signature unless @request_signature @request_signature = @request.webmock_signature register_request(@request_signature) end @request_signature end |