Module: Sidekiq::LimitFetch::Instances
- Included in:
- Queue
- Defined in:
- lib/sidekiq/limit_fetch/instances.rb
Class Method Summary collapse
Instance Method Summary collapse
- #delete_instance(name) ⇒ Object
- #instances ⇒ Object
- #new(*args) ⇒ Object (also: #[])
- #reset_instances! ⇒ Object
Class Method Details
.extended(klass) ⇒ Object
6 7 8 |
# File 'lib/sidekiq/limit_fetch/instances.rb', line 6 def self.extended(klass) klass.instance_variable_set :@instances, {} end |
Instance Method Details
#delete_instance(name) ⇒ Object
24 25 26 |
# File 'lib/sidekiq/limit_fetch/instances.rb', line 24 def delete_instance(name) @instances.delete [name] end |
#instances ⇒ Object
16 17 18 |
# File 'lib/sidekiq/limit_fetch/instances.rb', line 16 def instances @instances.values end |
#new(*args) ⇒ Object Also known as: []
10 11 12 |
# File 'lib/sidekiq/limit_fetch/instances.rb', line 10 def new(*args) @instances[args] ||= super end |
#reset_instances! ⇒ Object
20 21 22 |
# File 'lib/sidekiq/limit_fetch/instances.rb', line 20 def reset_instances! @instances = {} end |