Class: Gesund::Output::Text
- Inherits:
-
Object
- Object
- Gesund::Output::Text
- Defined in:
- lib/gesund/output/text.rb
Instance Method Summary collapse
-
#initialize(checks) ⇒ Text
constructor
A new instance of Text.
Constructor Details
#initialize(checks) ⇒ Text
Returns a new instance of Text.
3 4 5 6 7 8 9 10 11 |
# File 'lib/gesund/output/text.rb', line 3 def initialize(checks) results = Gesund::CheckRunner.run(checks) failflag = false results.each do |check| failflag = true if check.first.to_i != 200 puts "#{check.first}: #{check.last.join}" end puts "\nRESULT: Health check #{failflag ? "failed!" : "passed."}" end |