debian-mirror-gitlab/lib/gitlab/abuse.rb

19 lines
302 B
Ruby
Raw Normal View History

2022-01-26 12:08:38 +05:30
# frozen_string_literal: true
module Gitlab
module Abuse
CONFIDENCE_LEVELS = {
2022-10-11 01:57:18 +05:30
certain: 1.0,
likely: 0.8,
2022-01-26 12:08:38 +05:30
uncertain: 0.5,
2022-10-11 01:57:18 +05:30
unknown: 0.0
2022-01-26 12:08:38 +05:30
}.freeze
class << self
def confidence(rating)
CONFIDENCE_LEVELS.fetch(rating.to_sym)
end
end
end
end