Class: MiniCheck::ChecksCollection
- Inherits:
-
Array
- Object
- Array
- MiniCheck::ChecksCollection
- Defined in:
- lib/mini_check/checks_collection.rb
Instance Method Summary collapse
Instance Method Details
#healthy? ⇒ Boolean
7 8 9 |
# File 'lib/mini_check/checks_collection.rb', line 7 def healthy? all?(&:healthy?) end |
#register(name, &block) ⇒ Object
15 16 17 |
# File 'lib/mini_check/checks_collection.rb', line 15 def register name, &block push(Check.new(name, &block)) end |
#run ⇒ Object
11 12 13 |
# File 'lib/mini_check/checks_collection.rb', line 11 def run each(&:run) end |
#to_hash ⇒ Object
3 4 5 |
# File 'lib/mini_check/checks_collection.rb', line 3 def to_hash Hash[map { |check| [check.name, check.to_hash] }] end |