Sha256: 5614f7ce3abb780417c3e49c3526fa3d0f892e8d6b25632a5fd98231998d4d93
Contents?: true
Size: 615 Bytes
Versions: 14
Compression:
Stored size: 615 Bytes
Contents
module LitmusPaper class Health attr_reader :summary def initialize @value = 0 @dependencies_available = true @summary = "" end def ok? value > 0 end def value return 0 unless @dependencies_available @value end def perform(metric) health = metric.current_health @value += health @summary << "#{metric}: #{health}\n" end def ensure(dependency) available = dependency.available? @dependencies_available &&= available @summary << "#{dependency}: #{available ? 'OK' : 'FAIL'}\n" end end end
Version data entries
14 entries across 14 versions & 1 rubygems