mirror of
https://github.com/gitlabhq/gitlabhq.git
synced 2025-08-03 16:37:48 +00:00
19 lines
302 B
Ruby
19 lines
302 B
Ruby
# 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
|