Class: ConnectorsSdk::Base::Factory
- Inherits:
-
Object
- Object
- ConnectorsSdk::Base::Factory
- Defined in:
- lib/connectors_sdk/base/registry.rb
Instance Attribute Summary collapse
-
#connectors ⇒ Object
readonly
Returns the value of attribute connectors.
Instance Method Summary collapse
- #connector_class(name) ⇒ Object
-
#initialize ⇒ Factory
constructor
A new instance of Factory.
- #register(name, klass) ⇒ Object
Constructor Details
#initialize ⇒ Factory
Returns a new instance of Factory.
12 13 14 |
# File 'lib/connectors_sdk/base/registry.rb', line 12 def initialize @connectors = {} end |
Instance Attribute Details
#connectors ⇒ Object (readonly)
Returns the value of attribute connectors.
10 11 12 |
# File 'lib/connectors_sdk/base/registry.rb', line 10 def connectors @connectors end |
Instance Method Details
#connector_class(name) ⇒ Object
20 21 22 |
# File 'lib/connectors_sdk/base/registry.rb', line 20 def connector_class(name) @connectors[name] end |
#register(name, klass) ⇒ Object
16 17 18 |
# File 'lib/connectors_sdk/base/registry.rb', line 16 def register(name, klass) @connectors[name] = klass end |