lib/humanize/giga.rb in humanize-bytes-2.0.1 vs lib/humanize/giga.rb in humanize-bytes-2.1.0

- old
+ new

@@ -1,15 +1,7 @@ module Humanize - class Giga - def initialize(value) - @value = value - end - - def value - @value - end - + class Giga < Bytes def to_b Byte.new @value * 1024 * 1024 * 1024 end def to_k @@ -20,14 +12,8 @@ Mega.new @value * 1024 end def to_g self - end - - def to_s(options = {}) - size = options.fetch(:decimal_digits, nil) - size ||= value.to_s.split('.').size == 1 ? 0 : value.to_s.split('.').last.size - ("%.#{size}f" % value).to_s end end end \ No newline at end of file