Class: SimpleCovJSONFormatter::SourceFileFormatter
- Inherits:
-
Object
- Object
- SimpleCovJSONFormatter::SourceFileFormatter
- Defined in:
- lib/simplecov_json_formatter/source_file_formatter.rb
Instance Method Summary collapse
- #format ⇒ Object
-
#initialize(source_file) ⇒ SourceFileFormatter
constructor
A new instance of SourceFileFormatter.
Constructor Details
#initialize(source_file) ⇒ SourceFileFormatter
Returns a new instance of SourceFileFormatter.
5 6 7 8 |
# File 'lib/simplecov_json_formatter/source_file_formatter.rb', line 5 def initialize(source_file) @source_file = source_file @line_coverage = nil end |
Instance Method Details
#format ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/simplecov_json_formatter/source_file_formatter.rb', line 10 def format if SimpleCov.branch_coverage? line_coverage.merge(branch_coverage) else line_coverage end end |