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

Instance Method Summary collapse

Instance Attribute Details

#connector_registrationObject

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