class SimpleCovJSONFormatter::ResultExporter
Constants
- FILENAME
Public Class Methods
new(result_hash)
click to toggle source
# File lib/simplecov_json_formatter/result_exporter.rb, line 7 def initialize(result_hash) @result = result_hash end
Public Instance Methods
export()
click to toggle source
# File lib/simplecov_json_formatter/result_exporter.rb, line 11 def export File.open(export_path, 'w') do |file| file << json_result end end
Private Instance Methods
export_path()
click to toggle source
# File lib/simplecov_json_formatter/result_exporter.rb, line 23 def export_path File.join(SimpleCov.coverage_path, FILENAME) end
json_result()
click to toggle source
# File lib/simplecov_json_formatter/result_exporter.rb, line 19 def json_result JSON.pretty_generate(@result) end