Class: Healthcheck::Checker
- Inherits:
-
Object
- Object
- Healthcheck::Checker
- Defined in:
- lib/healthcheck/checker.rb
Instance Attribute Summary collapse
-
#errors ⇒ Object
Returns the value of attribute errors.
Instance Method Summary collapse
- #check ⇒ Object
- #errored? ⇒ Boolean
-
#initialize ⇒ Checker
constructor
A new instance of Checker.
Constructor Details
#initialize ⇒ Checker
Returns a new instance of Checker.
7 8 9 |
# File 'lib/healthcheck/checker.rb', line 7 def initialize @errors = [] end |
Instance Attribute Details
#errors ⇒ Object
Returns the value of attribute errors.
5 6 7 |
# File 'lib/healthcheck/checker.rb', line 5 def errors @errors end |
Instance Method Details
#check ⇒ Object
11 12 13 14 15 16 |
# File 'lib/healthcheck/checker.rb', line 11 def check Healthcheck.configuration .checks .map { |c| Thread.new { execute(c) } } .each(&:join) end |
#errored? ⇒ Boolean
18 19 20 |
# File 'lib/healthcheck/checker.rb', line 18 def errored? @errors.any? end |