Class: Eipiai::HealthCheck
- Inherits:
-
Object
- Object
- Eipiai::HealthCheck
- Defined in:
- lib/eipiai/webmachine/resources/health.rb
Overview
HealthCheck
Class with a single method ‘healthy?`. Returns `true` by default.
Instance Method Summary collapse
-
#healthy? ⇒ true, false
healthy?.
-
#to_hash ⇒ Hash
to_hash.
Instance Method Details
#healthy? ⇒ true, false
healthy?
Can be overwritten with custom logic to determine health status.
18 19 20 |
# File 'lib/eipiai/webmachine/resources/health.rb', line 18 def healthy? Eipiai.configuration.healthy == true end |
#to_hash ⇒ Hash
to_hash
Hash representation of the health status.
28 29 30 |
# File 'lib/eipiai/webmachine/resources/health.rb', line 28 def to_hash { 'healthy' => healthy? } end |