module Maid::NumericExtensions::SizeToKb

Public Instance Methods

gB()
Alias for: gb
gb() click to toggle source
# File lib/maid/numeric_extensions.rb, line 114
def gb
  self * 1024 ** 2
end
Also aliased as: gigabytes, gigabyte, gB
gigabyte()
Alias for: gb
gigabytes()
Alias for: gb
kB()
Alias for: kb
kb() click to toggle source

Enables Computer disk size conversion into kilobytes.

Can convert megabytes, gigabytes and terabytes. Handles full name (megabyte), plural (megabytes) and symobl (mb/mB).

1.megabyte = 1024 kilobytes
# File lib/maid/numeric_extensions.rb, line 100
def kb
  self
end
Also aliased as: kilobytes, kilobyte, kB
kilobyte()
Alias for: kb
kilobytes()
Alias for: kb
mB()
Alias for: mb
mb() click to toggle source
# File lib/maid/numeric_extensions.rb, line 107
def mb
  self * 1024 ** 1
end
Also aliased as: megabytes, megabyte, mB
megabyte()
Alias for: mb
megabytes()
Alias for: mb
tB()
Alias for: tb
tb() click to toggle source
# File lib/maid/numeric_extensions.rb, line 121
def tb
  self * 1024 ** 3
end
Also aliased as: terabytes, terabyte, tB
terabyte()
Alias for: tb
terabytes()
Alias for: tb