comparison to gcs and aws prices

This commit is contained in:
Kyle Drake 2017-06-03 18:08:35 -07:00
parent c4e307fcf1
commit 371f8ec465
2 changed files with 32 additions and 4 deletions

View file

@ -30,6 +30,14 @@ class Numeric
"#{computed} #{unit}"
end
def to_gigabytes_pretty
self.to_gigabytes.to_s + ' GB'
end
def to_gigabytes
self / (1000**3)
end
def to_comma_separated
self.to_i.to_s.chars.to_a.reverse.each_slice(3).map(&:join).join(",").reverse
end