Class: SidekiqVigil::Check::Registry
- Inherits:
-
Object
- Object
- SidekiqVigil::Check::Registry
- Defined in:
- lib/sidekiq_vigil/check/registry.rb
Instance Method Summary collapse
- #fetch(name) ⇒ Object
-
#initialize ⇒ Registry
constructor
A new instance of Registry.
- #names ⇒ Object
- #register(name, klass) ⇒ Object
Constructor Details
#initialize ⇒ Registry
Returns a new instance of Registry.
6 7 8 |
# File 'lib/sidekiq_vigil/check/registry.rb', line 6 def initialize @checks = {} end |
Instance Method Details
#fetch(name) ⇒ Object
14 15 16 |
# File 'lib/sidekiq_vigil/check/registry.rb', line 14 def fetch(name) @checks.fetch(name.to_sym) end |
#names ⇒ Object
18 19 20 |
# File 'lib/sidekiq_vigil/check/registry.rb', line 18 def names @checks.keys end |
#register(name, klass) ⇒ Object
10 11 12 |
# File 'lib/sidekiq_vigil/check/registry.rb', line 10 def register(name, klass) @checks[name.to_sym] = klass end |