Module: Chronicle::ETL::Registry::SelfRegistering
- Extended by:
- Forwardable
- Included in:
- Extractor, Loader, Transformer
- Defined in:
- lib/chronicle/etl/registry/self_registering.rb
Overview
Gives a connector class the ability to let the Chronicle::ETL::Registry know about itself
Instance Attribute Summary collapse
-
#connector_registration ⇒ Object
Returns the value of attribute connector_registration.
Instance Method Summary collapse
-
#register_connector {|@connector_registration| ... } ⇒ Object
Creates a ConnectorRegistration for this connector's details and register's it into the Registry.
Instance Attribute Details
#connector_registration ⇒ Object
Returns the value of attribute connector_registration.
11 12 13 |
# File 'lib/chronicle/etl/registry/self_registering.rb', line 11 def connector_registration @connector_registration end |
Instance Method Details
#register_connector {|@connector_registration| ... } ⇒ Object
Creates a ConnectorRegistration for this connector's details and register's it into the Registry
17 18 19 20 21 |
# File 'lib/chronicle/etl/registry/self_registering.rb', line 17 def register_connector @connector_registration ||= ::Chronicle::ETL::Registry::ConnectorRegistration.new(self) yield @connector_registration if block_given? ::Chronicle::ETL::Registry::Connectors.register(@connector_registration) end |