Class: Gitlab::CycleAnalytics::Summary::Value::PrettyNumeric

Inherits:
Numeric show all
Defined in:
lib/gitlab/cycle_analytics/summary/value.rb

Instance Attribute Summary

Attributes inherited from Gitlab::CycleAnalytics::Summary::Value

#value

Instance Method Summary collapse

Methods inherited from Numeric

#initialize, #to_i

Methods inherited from Gitlab::CycleAnalytics::Summary::Value

#raw_value

Constructor Details

This class inherits a constructor from Gitlab::CycleAnalytics::Summary::Value::Numeric

Instance Method Details

#to_sObject


46
47
48
49
# File 'lib/gitlab/cycle_analytics/summary/value.rb', line 46

def to_s
  # 0 is shown as -
  (value || 0).nonzero? ? super : None.new.to_s
end