Sha256: 51e8937346b5e037904d7d50d9aa89372a66679028ad7ff4d2dc3b9c11a20cd2

Contents?: true

Size: 778 Bytes

Versions: 29

Compression:

Stored size: 778 Bytes

Contents

# frozen_string_literal: true

####
# An array of  FileLists instances with helpers to roll up the stats
# methods for calculating coverage across them etc.
####
module Coverband
  module Utils
    class GemList < FileList
      # Returns the count of lines that have coverage
      def covered_lines
        to_a.map(&:covered_lines).inject(:+)
      end

      # Returns the count of lines that have been missed
      def missed_lines
        to_a.map(&:missed_lines).inject(:+)
      end

      # Returns the count of lines that are not relevant for coverage
      def never_lines
        to_a.map(&:never_lines).inject(:+)
      end

      # Returns the count of skipped lines
      def skipped_lines
        to_a.map(&:skipped_lines).inject(:+)
      end
    end
  end
end

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
coverband-4.2.7 lib/coverband/utils/gem_list.rb
coverband-4.2.7.rc.1 lib/coverband/utils/gem_list.rb
coverband-4.2.6 lib/coverband/utils/gem_list.rb
coverband-4.2.5 lib/coverband/utils/gem_list.rb
coverband-4.2.5.rc.2 lib/coverband/utils/gem_list.rb
coverband-4.2.5.rc.1 lib/coverband/utils/gem_list.rb
coverband-4.2.4 lib/coverband/utils/gem_list.rb
coverband-4.2.4.rc.3 lib/coverband/utils/gem_list.rb
coverband-4.2.4.rc.2 lib/coverband/utils/gem_list.rb
coverband-4.2.4.rc.1 lib/coverband/utils/gem_list.rb
coverband-4.2.3 lib/coverband/utils/gem_list.rb
coverband-4.2.3.rc.2 lib/coverband/utils/gem_list.rb
coverband-4.2.3.rc.1 lib/coverband/utils/gem_list.rb
coverband-4.2.2 lib/coverband/utils/gem_list.rb
coverband-4.2.2.rc.1 lib/coverband/utils/gem_list.rb
coverband-4.2.1 lib/coverband/utils/gem_list.rb
coverband-4.2.1.rc4 lib/coverband/utils/gem_list.rb
coverband-4.2.1.rc3 lib/coverband/utils/gem_list.rb
coverband-4.2.1.rc2 lib/coverband/utils/gem_list.rb
coverband-4.2.1.rc1 lib/coverband/utils/gem_list.rb