class HealthRack::Base
Public Class Methods
check(name, &block)
click to toggle source
# File lib/health_rack/base.rb, line 12 def check(name, &block) _checks << Check.new(name, &block) end
checks()
click to toggle source
# File lib/health_rack/base.rb, line 8 def checks _checks.dup end
title(title = @title)
click to toggle source
# File lib/health_rack/base.rb, line 4 def title(title = @title) @title = title || "Health status" end
Private Class Methods
_checks()
click to toggle source
# File lib/health_rack/base.rb, line 18 def _checks @checks ||= [] end
Public Instance Methods
call(env)
click to toggle source
# File lib/health_rack/base.rb, line 23 def call(env) Controller.new(env).perform(self) end
checks()
click to toggle source
# File lib/health_rack/base.rb, line 31 def checks self.class.checks end
results()
click to toggle source
# File lib/health_rack/base.rb, line 35 def results checks.each(&:perform) end
title()
click to toggle source
# File lib/health_rack/base.rb, line 27 def title self.class.title end