Class: SimpleCovJSONFormatter::ResultExporter
- Inherits:
-
Object
- Object
- SimpleCovJSONFormatter::ResultExporter
- Defined in:
- lib/simplecov_json_formatter/result_exporter.rb
Constant Summary collapse
- FILENAME =
'coverage.json'
Instance Method Summary collapse
- #export ⇒ Object
-
#initialize(result_hash) ⇒ ResultExporter
constructor
A new instance of ResultExporter.
Constructor Details
#initialize(result_hash) ⇒ ResultExporter
Returns a new instance of ResultExporter.
7 8 9 |
# File 'lib/simplecov_json_formatter/result_exporter.rb', line 7 def initialize(result_hash) @result = result_hash end |
Instance Method Details
#export ⇒ Object
11 12 13 14 15 |
# File 'lib/simplecov_json_formatter/result_exporter.rb', line 11 def export File.open(export_path, 'w') do |file| file << json_result end end |