Class: SimpleCovTextFormatter::SourceFileFormatter

Inherits:
Object
  • Object
show all
Defined in:
lib/simplecov_text_formatter/source_file_formatter.rb

Constant Summary collapse

NOT_COVERED_LINE_CODE =
0
VALID_MSG_PARTS_COUNT =
4
FILE_COLUMN =
1

Instance Method Summary collapse

Constructor Details

#initialize(source_file) ⇒ SourceFileFormatter

Returns a new instance of SourceFileFormatter.



7
8
9
# File 'lib/simplecov_text_formatter/source_file_formatter.rb', line 7

def initialize(source_file)
  @source_file = source_file
end

Instance Method Details

#formatObject



11
12
13
14
15
# File 'lib/simplecov_text_formatter/source_file_formatter.rb', line 11

def format
  not_covered_lines_in_batches.map do |batch|
    build_message(batch)
  end.reject(&:nil?)
end