Class: Hospital::Formatter::Pre

Inherits:
Base
  • Object
show all
Defined in:
lib/hospital/formatter/pre.rb

Instance Attribute Summary

Attributes inherited from Base

#buffer

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from Hospital::Formatter::Base

Instance Method Details

#put_diagnosis_header(text) ⇒ Object



12
13
14
# File 'lib/hospital/formatter/pre.rb', line 12

def put_diagnosis_header text
  @buffer << "\n\n## #{text}"
end

#put_diagnosis_result(text) ⇒ Object



25
26
27
# File 'lib/hospital/formatter/pre.rb', line 25

def put_diagnosis_result text
  @buffer << "\n#{text}"
end

#put_group_header(text) ⇒ Object



8
9
10
# File 'lib/hospital/formatter/pre.rb', line 8

def put_group_header text
  @buffer << "\n\n### #{text}"
end

#put_summary(errors_count, warnings_count) ⇒ Object



16
17
18
19
20
21
22
23
# File 'lib/hospital/formatter/pre.rb', line 16

def put_summary errors_count, warnings_count
  @buffer <<  <<~END
    \n\n
    #### Summary:
    Errors:   #{errors_count}
    Warnings: #{warnings_count}
  END
end