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.
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
#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
#each_adapter(&block) ⇒ Object
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 |
#register(lib, adapter) ⇒ Object
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 |