Sha256: 93f96659ded67e900c7431e8b81243e081fd5b578cf0894695fd236f73b05ef4
Contents?: true
Size: 637 Bytes
Versions: 1
Compression:
Stored size: 637 Bytes
Contents
module Humanize class Zetta < Bytes def to_b Byte.new @value * 1024 * 1024 * 1024 * 1024 * 1024 * 1024 * 1024 end def to_k Kilo.new @value * 1024 * 1024 * 1024 * 1024 * 1024 * 1024 end def to_m Mega.new @value * 1024 * 1024 * 1024 * 1024 * 1024 end def to_g Giga.new @value * 1024 * 1024 * 1024 * 1024 end def to_t Tera.new @value * 1024 * 1024 * 1024 end def to_p Peta.new @value * 1024 * 1024 end def to_e Exa.new @value * 1024 end def to_z self end def to_y Yotta.new @value / 1024.0 end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
humanize-bytes-2.2.0 | lib/humanize/zetta.rb |