Sha256: 01075fa346654902472efd6a7d441fa5ecbff8daa38b04d321a1275bc5b5e754

Contents?: true

Size: 194 Bytes

Versions: 16

Compression:

Stored size: 194 Bytes

Contents

module Sidekiq::LimitFetch::Singleton
  def self.extended(klass)
    klass.instance_variable_set :@instances, {}
  end

  def new(*args)
    @instances[args] ||= super
  end

  alias [] new
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
sidekiq-limit_fetch-2.0.1 lib/sidekiq/limit_fetch/singleton.rb
sidekiq-limit_fetch-2.0 lib/sidekiq/limit_fetch/singleton.rb
sidekiq-limit_fetch-1.7 lib/sidekiq/limit_fetch/singleton.rb
sidekiq-limit_fetch-1.6 lib/sidekiq/limit_fetch/singleton.rb
sidekiq-limit_fetch-1.5 lib/sidekiq/limit_fetch/singleton.rb
sidekiq-limit_fetch-1.4 lib/sidekiq/limit_fetch/singleton.rb
sidekiq-limit_fetch-1.3 lib/sidekiq/limit_fetch/singleton.rb
sidekiq-limit_fetch-1.2 lib/sidekiq/limit_fetch/singleton.rb
sidekiq-limit_fetch-1.1 lib/sidekiq/limit_fetch/singleton.rb
sidekiq-limit_fetch-1.0 lib/sidekiq/limit_fetch/singleton.rb
sidekiq-limit_fetch-0.9 lib/sidekiq/limit_fetch/singleton.rb
sidekiq-limit_fetch-0.8 lib/sidekiq/limit_fetch/singleton.rb
sidekiq-limit_fetch-0.7 lib/sidekiq/limit_fetch/singleton.rb
sidekiq-limit_fetch-0.6 lib/sidekiq/limit_fetch/singleton.rb
sidekiq-limit_fetch-0.4 lib/sidekiq/limit_fetch/singleton.rb
sidekiq-limit_fetch-0.3 lib/sidekiq/limit_fetch/singleton.rb