Class: Healthcheck::Checker

Inherits:
Object
  • Object
show all
Defined in:
lib/healthcheck/checker.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeChecker

Returns a new instance of Checker.



7
8
9
# File 'lib/healthcheck/checker.rb', line 7

def initialize
  @errors = []
end

Instance Attribute Details

#errorsObject

Returns the value of attribute errors.



5
6
7
# File 'lib/healthcheck/checker.rb', line 5

def errors
  @errors
end

Instance Method Details

#checkObject



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

Returns:

  • (Boolean)


18
19
20
# File 'lib/healthcheck/checker.rb', line 18

def errored?
  @errors.any?
end