Sha256: 55d5f23f9c8b00a8148cc41bdbe8feb175f9139f4815a8148fc1d9a1d731ee5b

Contents?: true

Size: 351 Bytes

Versions: 6

Compression:

Stored size: 351 Bytes

Contents

# frozen_string_literal: true

require "rubycritic/core/analysed_modules_collection"

module RubyCritic
  # nodoc #
  class AnalysedModulesCollection
    def stink_score_average
      num_modules = @modules.size
      if num_modules.positive?
        map(&:stink_score).reduce(:+) / num_modules.to_f
      else
        0.0
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
skunk-0.4.2 lib/skunk/rubycritic/analysed_modules_collection.rb
skunk-0.4.1 lib/skunk/rubycritic/analysed_modules_collection.rb
skunk-0.4.0 lib/skunk/rubycritic/analysed_modules_collection.rb
skunk-0.3.2 lib/skunk/rubycritic/analysed_modules_collection.rb
skunk-0.3.1 lib/skunk/rubycritic/analysed_modules_collection.rb
skunk-0.3.0 lib/skunk/rubycritic/analysed_modules_collection.rb