Sha256: 6eba54e945cda053e7466628dda6240fde350f351444f486aca07286c5e738f8

Contents?: true

Size: 363 Bytes

Versions: 1

Compression:

Stored size: 363 Bytes

Contents

module Nurse
  class ServiceFactory
    def attach_to(dependency_manager)
      dependency_manager.set(dependency_key) do |di|
        create_service(di)
      end
    end

    def create_service(_dependency_manager)
      fail 'create_service must be implemented'
    end

    def dependency_key
      fail 'dependency_key must be implemented'
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
nurse-rb-2.0.0 lib/nurse/service_factory.rb