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
#initialize ⇒ HttpLibAdapterRegistry
Returns a new instance of HttpLibAdapterRegistry.
7 8 9 |
# File 'lib/webmock/http_lib_adapters/http_lib_adapter_registry.rb', line 7 def initialize @http_lib_adapters = {} end |
Instance Attribute Details
#http_lib_adapters ⇒ Object
Returns the value of attribute http_lib_adapters.
5 6 7 |
# File 'lib/webmock/http_lib_adapters/http_lib_adapter_registry.rb', line 5 def http_lib_adapters @http_lib_adapters end |
Instance Method Details
#each_adapter(&block) ⇒ Object
15 16 17 |
# File 'lib/webmock/http_lib_adapters/http_lib_adapter_registry.rb', line 15 def each_adapter(&block) @http_lib_adapters.each(&block) end |
#register(lib, adapter) ⇒ Object
11 12 13 |
# File 'lib/webmock/http_lib_adapters/http_lib_adapter_registry.rb', line 11 def register(lib, adapter) @http_lib_adapters[lib] = adapter end |