Module: Kindly::Registry
- Defined in:
- lib/kindly/registry.rb
Class Method Summary collapse
Class Method Details
.find(job_name) ⇒ Object
15 16 17 18 |
# File 'lib/kindly/registry.rb', line 15 def self.find(job_name) raise no_job(job_name) unless registered?(job_name) @@jobs[job_name.to_sym] end |
.register(job_name, job) ⇒ Object
6 7 8 9 |
# File 'lib/kindly/registry.rb', line 6 def self.register(job_name, job) @@jobs ||= {} @@jobs[job_name.to_sym] = job end |
.unregister(job_name) ⇒ Object
11 12 13 |
# File 'lib/kindly/registry.rb', line 11 def self.unregister(job_name) @@jobs.delete(job_name.to_sym) end |