Class: Stats::StatsValue

Inherits:
Struct
  • Object
show all
Defined in:
app/services/stats.rb

Instance Method Summary collapse

Instance Method Details

#changeObject


79
80
81
# File 'app/services/stats.rb', line 79

def change
  value - old_value
end

#change_prefixObject


83
84
85
# File 'app/services/stats.rb', line 83

def change_prefix
  "+" if change > 0
end

#to_iObject


87
88
89
# File 'app/services/stats.rb', line 87

def to_i
  value.to_i
end

#to_sObject


91
92
93
# File 'app/services/stats.rb', line 91

def to_s
  value.to_s
end