Parent

Methods

Fixnum

Some convenient methods for converting bytes to kb, mb, and gb.

Public Instance Methods

to_gb() click to toggle source

Converts a number to gigabytes.

# File lib/unix/sys/filesystem.rb, line 558
def to_gb
  self / 1073741824
end
to_kb() click to toggle source

Converts a number to kilobytes.

# File lib/unix/sys/filesystem.rb, line 548
def to_kb
  self / 1024
end
to_mb() click to toggle source

Converts a number to megabytes.

# File lib/unix/sys/filesystem.rb, line 553
def to_mb
  self / 1048576
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.