lib/simplecov/simulate_coverage.rb
def call(absolute_path)
      lines = File.foreach(absolute_path)

      {
        "lines" => LinesClassifier.new.classify(lines),
        # we don't want to parse branches ourselves...
        # requiring files can have side effects and we don't want to trigger that
        "branches" => {}
      }
    end
#
# Simulate normal file coverage report on
# ruby 2.5 and return similar hash with lines and branches keys
#
# Happens when a file wasn't required but still tracked.
#
# @return [Hash]
#
Simulate normal file coverage report on
ruby 2.5 and return similar hash with lines and branches keys

Happens when a file wasn't required but still tracked.
Simulate normal file coverage report on ruby 2 . 5 and return similar hash with lines and branches keys Happens when a file wasn ' t required but still tracked .
def call(absolute_path)
      lines = File.foreach(absolute_path)
      {
        "lines" => LinesClassifier.new.classify(lines),
        "branches" => {}
      }
    end
def call ( absolute_path ) lines = File . foreach ( absolute_path ) { "lines" => LinesClassifier . new . classify ( lines ) , "branches" => { } } end
Simulate normal file coverage report on
ruby 2.5 and return similar hash with lines and branches keys
Simulate normal file coverage report on ruby 2 . 5 and return similar hash with lines and branches keys
# we don't want to parse branches ourselves... # requiring files can have side effects and we don't want to trigger that
None
Hash
absolute_path