module Sidekiq::LimitFetch::Instances

Public Class Methods

extended(klass) click to toggle source
# File lib/sidekiq/limit_fetch/instances.rb, line 6
def self.extended(klass)
  klass.instance_variable_set :@instances, {}
end

Public Instance Methods

[](*args)
Alias for: new
delete_instance(name) click to toggle source
# File lib/sidekiq/limit_fetch/instances.rb, line 24
def delete_instance(name)
  @instances.delete [name]
end
instances() click to toggle source
# File lib/sidekiq/limit_fetch/instances.rb, line 16
def instances
  @instances.values
end
new(*args) click to toggle source
Calls superclass method
# File lib/sidekiq/limit_fetch/instances.rb, line 10
def new(*args)
  @instances[args] ||= super
end
Also aliased as: []
reset_instances!() click to toggle source
# File lib/sidekiq/limit_fetch/instances.rb, line 20
def reset_instances!
  @instances = {}
end