Module: Sidekiq::LimitFetch::Singleton
- Included in:
- Queue
- Defined in:
- lib/sidekiq/limit_fetch/singleton.rb
Class Method Summary collapse
Instance Method Summary collapse
- #instances ⇒ Object
- #new(*args) ⇒ Object (also: #[])
Class Method Details
.extended(klass) ⇒ Object
2 3 4 |
# File 'lib/sidekiq/limit_fetch/singleton.rb', line 2 def self.extended(klass) klass.instance_variable_set :@instances, {} end |
Instance Method Details
#instances ⇒ Object
12 13 14 |
# File 'lib/sidekiq/limit_fetch/singleton.rb', line 12 def instances @instances.values end |
#new(*args) ⇒ Object Also known as: []
6 7 8 |
# File 'lib/sidekiq/limit_fetch/singleton.rb', line 6 def new(*args) @instances[args] ||= super end |