Class: WebMock::HttpLibAdapterRegistry
- Inherits:
-
Object
- Object
- WebMock::HttpLibAdapterRegistry
- Includes:
- Singleton
- Defined in:
- lib/webmock/http_lib_adapters/http_lib_adapter_registry.rb
Instance Attribute Summary collapse
-
#http_lib_adapters ⇒ Object
Returns the value of attribute http_lib_adapters.
Instance Method Summary collapse
- #each_adapter(&block) ⇒ Object
-
#initialize ⇒ HttpLibAdapterRegistry
constructor
A new instance of HttpLibAdapterRegistry.
- #register(lib, adapter) ⇒ Object
Constructor Details
permalink #initialize ⇒ HttpLibAdapterRegistry
Returns a new instance of HttpLibAdapterRegistry.
9 10 11 |
# File 'lib/webmock/http_lib_adapters/http_lib_adapter_registry.rb', line 9 def initialize @http_lib_adapters = {} end |
Instance Attribute Details
permalink #http_lib_adapters ⇒ Object
Returns the value of attribute http_lib_adapters.
7 8 9 |
# File 'lib/webmock/http_lib_adapters/http_lib_adapter_registry.rb', line 7 def http_lib_adapters @http_lib_adapters end |
Instance Method Details
permalink #each_adapter(&block) ⇒ Object
[View source] [View on GitHub]
17 18 19 |
# File 'lib/webmock/http_lib_adapters/http_lib_adapter_registry.rb', line 17 def each_adapter(&block) @http_lib_adapters.each(&block) end |
permalink #register(lib, adapter) ⇒ Object
[View source] [View on GitHub]
13 14 15 |
# File 'lib/webmock/http_lib_adapters/http_lib_adapter_registry.rb', line 13 def register(lib, adapter) @http_lib_adapters[lib] = adapter end |