Sha256: 27f0623a276f4553b4e6f0df1f4b0dde63e9e5e1bdb3797256d40e1a2fc74275

Contents?: true

Size: 381 Bytes

Versions: 1

Compression:

Stored size: 381 Bytes

Contents

#
# Copyright (c) 2018 Patrick Thomas.  All rights reserved.
#
module Cayuga
  module Object
    # Cayuga Object Singleton
    class Singleton < Object
      def self.create(factory, configuration)
        raise "#{stringify} already registered" if factory.registered?(self)

        factory.register(new(factory, configuration), self)
      end

    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
cayuga-0.0.23 lib/cayuga/object/singleton.rb