Class: SimpleCov::SourceFile::LineBuilder

Inherits:
Object
  • Object
show all
Defined in:
lib/simplecov/source_file/line_builder.rb

Overview

Builds the SourceFile::Line objects for a source file from the raw line-coverage array, applying the disabled block ranges via skipped!.

Instance Method Summary collapse

Constructor Details

#initialize(source_file) ⇒ LineBuilder

Returns a new instance of LineBuilder.



8
9
10
# File 'lib/simplecov/source_file/line_builder.rb', line 8

def initialize(source_file)
  @source_file = source_file
end

Instance Method Details

#callObject



12
13
14
15
16
# File 'lib/simplecov/source_file/line_builder.rb', line 12

def call
  lines = build_lines
  mark_skipped(lines, @source_file.skip_chunks_for(:line))
  lines
end