Sha256: 3f769c88117fcaf0e258457db00ebf1945897e21d27be21971f52a96ac89be42
Contents?: true
Size: 220 Bytes
Versions: 8
Compression:
Stored size: 220 Bytes
Contents
module Vagabond class << self def get_bytes(s) s = s.to_s indx = [nil, 'k', 'm', 'g'] power = indx.index(s.slice(-1, s.length).to_s.downcase).to_i * 10 (2**power) * s.to_i end end end
Version data entries
8 entries across 8 versions & 1 rubygems