Sha256: cd8d775b73dfe553efecf7d1959fe4eb735f594bea0e67a60c4acd51abdaafdf

Contents?: true

Size: 783 Bytes

Versions: 12

Compression:

Stored size: 783 Bytes

Contents

require 'forwardable'

module Chronicle
  module ETL
    module Registry
      # Gives a connector class the ability to let the Chronicle::ETL::Registry
      # know about itself
      module SelfRegistering
        extend Forwardable

        attr_accessor :connector_registration

        def_delegators :@connector_registration, :description, :provider, :identifier

        # Creates a ConnectorRegistration for this connector's details and register's it
        # into the Registry
        def register_connector
          @connector_registration ||= ::Chronicle::ETL::Registry::ConnectorRegistration.new(self)
          yield @connector_registration if block_given?
          ::Chronicle::ETL::Registry.register(@connector_registration)
        end
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
chronicle-etl-0.5.4 lib/chronicle/etl/registry/self_registering.rb
chronicle-etl-0.5.3 lib/chronicle/etl/registry/self_registering.rb
chronicle-etl-0.5.2 lib/chronicle/etl/registry/self_registering.rb
chronicle-etl-0.5.1 lib/chronicle/etl/registry/self_registering.rb
chronicle-etl-0.5.0 lib/chronicle/etl/registry/self_registering.rb
chronicle-etl-0.4.4 lib/chronicle/etl/registry/self_registering.rb
chronicle-etl-0.4.3 lib/chronicle/etl/registry/self_registering.rb
chronicle-etl-0.4.2 lib/chronicle/etl/registry/self_registering.rb
chronicle-etl-0.4.1 lib/chronicle/etl/registry/self_registering.rb
chronicle-etl-0.4.0 lib/chronicle/etl/registry/self_registering.rb
chronicle-etl-0.3.1 lib/chronicle/etl/registry/self_registering.rb
chronicle-etl-0.3.0 lib/chronicle/etl/registry/self_registering.rb