Welcome to mirror list, hosted at ThFree Co, Russian Federation.

abuse.rb « gitlab « lib - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: cc95d3c1e0cce6e21fb37fa1d2ca815d3931f338 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# frozen_string_literal: true

module Gitlab
  module Abuse
    CONFIDENCE_LEVELS = {
      certain:   1.0,
      likely:    0.8,
      uncertain: 0.5,
      unknown:   0.0
    }.freeze

    class << self
      def confidence(rating)
        CONFIDENCE_LEVELS.fetch(rating.to_sym)
      end
    end
  end
end