Class: HTTP::Client
- Inherits:
-
Object
- Object
- HTTP::Client
- Defined in:
- lib/webmock/http_lib_adapters/http_rb/client.rb
Instance Method Summary collapse
Instance Method Details
#__perform__ ⇒ Object
3 |
# File 'lib/webmock/http_lib_adapters/http_rb/client.rb', line 3 alias_method :__perform__, :perform |
#perform(request, options) ⇒ Object
5 6 7 8 9 |
# File 'lib/webmock/http_lib_adapters/http_rb/client.rb', line 5 def perform(request, ) return __perform__(request, ) unless webmock_enabled? WebMockPerform.new(request, ) { __perform__(request, ) }.exec end |
#webmock_enabled? ⇒ Boolean
11 12 13 |
# File 'lib/webmock/http_lib_adapters/http_rb/client.rb', line 11 def webmock_enabled? ::WebMock::HttpLibAdapters::HttpRbAdapter.enabled? end |