mjacobus/nurse-rb

View on GitHub
lib/nurse/shared_service_factory.rb

Summary

Maintainability
A
0 mins
Test Coverage
module Nurse
  class SharedServiceFactory < ServiceFactory
    def shared?
      true
    end

    class << self
      private

      def share(_shared)
        raise 'You cannot change the shared state of a shared service factory. Extend Nurse::ServiceFactory instead'
      end
    end
  end
end