Class: CompactJSON::Formatter
- Inherits:
-
Object
- Object
- CompactJSON::Formatter
- Defined in:
- lib/simplecov_compact_json.rb
Instance Attribute Summary collapse
-
#result ⇒ Object
readonly
Returns the value of attribute result.
Instance Method Summary collapse
Instance Attribute Details
#result ⇒ Object (readonly)
Returns the value of attribute result.
14 15 16 |
# File 'lib/simplecov_compact_json.rb', line 14 def result @result end |
Instance Method Details
#format(result) ⇒ Object
16 17 18 19 20 21 |
# File 'lib/simplecov_compact_json.rb', line 16 def format(result) @result = result File.open(destination_file, "w") do |file| file.print(formatted_result) end end |
#formatted_result ⇒ Object
23 24 25 26 27 28 |
# File 'lib/simplecov_compact_json.rb', line 23 def formatted_result { summary: summary_results, files: file_results }.to_json end |