Class: SimpleCovJSONFormatter::ResultHashFormatter
- Inherits:
-
Object
- Object
- SimpleCovJSONFormatter::ResultHashFormatter
- Defined in:
- lib/simplecov_json_formatter/result_hash_formatter.rb
Instance Method Summary collapse
- #format ⇒ Object
-
#initialize(result) ⇒ ResultHashFormatter
constructor
A new instance of ResultHashFormatter.
Constructor Details
#initialize(result) ⇒ ResultHashFormatter
Returns a new instance of ResultHashFormatter.
7 8 9 |
# File 'lib/simplecov_json_formatter/result_hash_formatter.rb', line 7 def initialize(result) @result = result end |
Instance Method Details
#format ⇒ Object
11 12 13 14 15 16 17 18 |
# File 'lib/simplecov_json_formatter/result_hash_formatter.rb', line 11 def format @result.files.each do |source_file| formatted_result[:coverage][source_file.filename] = format_source_file(source_file) end formatted_result end |