Module: CovidPT::Printer
Instance Method Summary collapse
Instance Method Details
#json(report) ⇒ Object
33 34 35 |
# File 'lib/covid_pt/printer.rb', line 33 def json(report) report.to_json end |
#md(report) ⇒ Object
20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/covid_pt/printer.rb', line 20 def md(report) case report[:type] when "report" md_report(report) when "comparison" md_comparison(report) when "range" md_range(report) else "Error: unknown report type" end end |
#pp(report) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/covid_pt/printer.rb', line 7 def pp(report) case report[:type] when "report" pp_report(report) when "comparison" pp_comparison(report) when "range" pp_range(report) else "Error: unknown report type" end end |