Sha256: ddf0276c2af273ea9ea9caf0c337fd5975fdc5cc4b512ff319f2406b5a3e91a8

Contents?: true

Size: 252 Bytes

Versions: 1

Compression:

Stored size: 252 Bytes

Contents

module Humanize
  class Giga < Bytes
    def to_b
      Byte.new @value * 1024 * 1024 * 1024
    end

    def to_k
      Kilo.new @value * 1024 * 1024
    end

    def to_m
      Mega.new @value * 1024
    end

    def to_g
      self
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
humanize-bytes-2.1.0 lib/humanize/giga.rb