Class: Hospital::Formatter::Shell
- Inherits:
-
Base
- Object
- Base
- Hospital::Formatter::Shell
show all
- Defined in:
- lib/hospital/formatter/shell.rb
Instance Attribute Summary
Attributes inherited from Base
#buffer
Instance Method Summary
collapse
Methods inherited from Base
#initialize
Instance Method Details
12
13
14
|
# File 'lib/hospital/formatter/shell.rb', line 12
def text
@buffer << "\n#{text.h2.indented}"
end
|
#put_diagnosis_result(text) ⇒ Object
25
26
27
|
# File 'lib/hospital/formatter/shell.rb', line 25
def put_diagnosis_result text
@buffer << "\n#{text.indented}"
end
|
8
9
10
|
# File 'lib/hospital/formatter/shell.rb', line 8
def text
@buffer << "\n### #{text}".h1
end
|
#put_summary(errors_count, warnings_count) ⇒ Object
16
17
18
19
20
21
22
23
|
# File 'lib/hospital/formatter/shell.rb', line 16
def put_summary errors_count, warnings_count
@buffer << <<~END
#{"Summary:".h1}
#{"Errors: #{errors_count}".red}
#{"Warnings: #{warnings_count}".yellow}
END
end
|