Class: HowIs::JsonReport
- Inherits:
-
BaseReport
- Object
- Struct
- BaseReport
- HowIs::JsonReport
- Defined in:
- lib/how_is/report/json.rb
Overview
A JSON report.
Instance Attribute Summary
Attributes inherited from BaseReport
Instance Method Summary collapse
-
#export ⇒ Object
Generates a report.
-
#export_file(file) ⇒ Object
Generates a report and writes it to a file.
-
#format ⇒ Symbol
The format of the report.
Methods inherited from BaseReport
#generate_report_text!, #header, #horizontal_bar_graph, #link, #text, #title, #to_h, #to_json, #unordered_list
Instance Method Details
#export ⇒ Object
Generates a report.
22 23 24 |
# File 'lib/how_is/report/json.rb', line 22 def export to_json end |
#export_file(file) ⇒ Object
Generates a report and writes it to a file.
28 29 30 31 32 |
# File 'lib/how_is/report/json.rb', line 28 def export_file(file) File.open(file, "w") do |f| f.write export end end |
#format ⇒ Symbol
The format of the report.
16 17 18 |
# File 'lib/how_is/report/json.rb', line 16 def format :json end |