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

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gitlab/cycle_analytics/summary/value.rb')
-rw-r--r--lib/gitlab/cycle_analytics/summary/value.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/gitlab/cycle_analytics/summary/value.rb b/lib/gitlab/cycle_analytics/summary/value.rb
index ce32132e048..e443e037517 100644
--- a/lib/gitlab/cycle_analytics/summary/value.rb
+++ b/lib/gitlab/cycle_analytics/summary/value.rb
@@ -15,6 +15,14 @@ module Gitlab
end
class None < self
+ def raw_value
+ 0
+ end
+
+ def to_i
+ raw_value
+ end
+
def to_s
'-'
end
@@ -28,6 +36,10 @@ module Gitlab
def to_s
value.zero? ? '0' : value.to_s
end
+
+ def to_i
+ raw_value
+ end
end
class PrettyNumeric < Numeric