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
5 |
# File 'lib/webmock/http_lib_adapters/http_rb/client.rb', line 5 alias_method :__perform__, :perform |
#perform(request, options) ⇒ Object
7 8 9 10 11 |
# File 'lib/webmock/http_lib_adapters/http_rb/client.rb', line 7 def perform(request, ) return __perform__(request, ) unless webmock_enabled? WebMockPerform.new(request, ) { __perform__(request, ) }.exec end |
#webmock_enabled? ⇒ Boolean
13 14 15 |
# File 'lib/webmock/http_lib_adapters/http_rb/client.rb', line 13 def webmock_enabled? ::WebMock::HttpLibAdapters::HttpRbAdapter.enabled? end |