Sha256: eaa30ca02b3cde2905506692862967bed00f5c049de9a3db5e906d3c9e53f676
Contents?: true
Size: 271 Bytes
Versions: 8
Compression:
Stored size: 271 Bytes
Contents
module Slapp module Helpers def convert_to_bytes(string) units = { :'K' => 1024, :'MB' => 1024 * 1024 } formula = units.map {|u| u.last if string.include? u.first.to_s }.compact string.to_i * formula.first end end end
Version data entries
8 entries across 8 versions & 1 rubygems