struct MemoryConversion::Bytes

Defined in:

Constructors

Instance Method Summary

Macro Summary

Constructor Detail

def self.new(value) #

Instance Method Detail

def to_b_s #

Produce a string representing this byte value like "##B".


def to_bits : BigFloat #

Convert this number of bytes to the equivalent number of bits


def to_byte_s #

Produce a string representing this byte value like "## bytes".


def to_bytes : BigFloat #

Convert this number of bytes to the equivalent number of bytes


def to_eb_s #

Produce a string representing this byte value like "##EB".


def to_exabits : BigFloat #

Convert this number of bytes to the equivalent number of Exabits


def to_exabyte_s #

Produce a string representing this byte value like "## Exabytes".


def to_exabytes : BigFloat #

Convert this number of bytes to the equivalent number of Exabytes


def to_gb_s #

Produce a string representing this byte value like "##GB".


def to_gigabits : BigFloat #

Convert this number of bytes to the equivalent number of Gigabits


def to_gigabyte_s #

Produce a string representing this byte value like "## Gigabytes".


def to_gigabytes : BigFloat #

Convert this number of bytes to the equivalent number of Gigabytes


def to_kb_s #

Produce a string representing this byte value like "##kB".


def to_kilobits : BigFloat #

Convert this number of bytes to the equivalent number of kilobits


def to_kilobyte_s #

Produce a string representing this byte value like "## kilobytes".


def to_kilobytes : BigFloat #

Convert this number of bytes to the equivalent number of kilobytes


def to_mb_s #

Produce a string representing this byte value like "##MB".


def to_megabits : BigFloat #

Convert this number of bytes to the equivalent number of Megabits


def to_megabyte_s #

Produce a string representing this byte value like "## Megabytes".


def to_megabytes : BigFloat #

Convert this number of bytes to the equivalent number of Megabytes


def to_pb_s #

Produce a string representing this byte value like "##PB".


def to_petabits : BigFloat #

Convert this number of bytes to the equivalent number of Petabits


def to_petabyte_s #

Produce a string representing this byte value like "## Petabytes".


def to_petabytes : BigFloat #

Convert this number of bytes to the equivalent number of Petabytes


def to_s(scale : Symbol? = nil) #
Description copied from class Object

Returns a string representation of this object.

Descendants must usually not override this method. Instead, they must override #to_s(io), which must append to the given IO object.


def to_storage_bits : BigFloat #

Convert to storage bytes and then multiply by 8.


def to_storage_bytes : BigFloat #

Convert this number of bytes to the equivalent number of bytes. This uses the metric used by storage manufacturers to inflate their capacity values, by using powers of 10 instead of powers of two.


def to_storage_exabits : BigFloat #

Convert to storage bytes and then multiply by 8.


def to_storage_exabytes : BigFloat #

Convert this number of bytes to the equivalent number of Exabytes. This uses the metric used by storage manufacturers to inflate their capacity values, by using powers of 10 instead of powers of two.


def to_storage_gigabits : BigFloat #

Convert to storage bytes and then multiply by 8.


def to_storage_gigabytes : BigFloat #

Convert this number of bytes to the equivalent number of Gigabytes. This uses the metric used by storage manufacturers to inflate their capacity values, by using powers of 10 instead of powers of two.


def to_storage_kilobits : BigFloat #

Convert to storage bytes and then multiply by 8.


def to_storage_kilobytes : BigFloat #

Convert this number of bytes to the equivalent number of kilobytes. This uses the metric used by storage manufacturers to inflate their capacity values, by using powers of 10 instead of powers of two.


def to_storage_megabits : BigFloat #

Convert to storage bytes and then multiply by 8.


def to_storage_megabytes : BigFloat #

Convert this number of bytes to the equivalent number of Megabytes. This uses the metric used by storage manufacturers to inflate their capacity values, by using powers of 10 instead of powers of two.


def to_storage_petabits : BigFloat #

Convert to storage bytes and then multiply by 8.


def to_storage_petabytes : BigFloat #

Convert this number of bytes to the equivalent number of Petabytes. This uses the metric used by storage manufacturers to inflate their capacity values, by using powers of 10 instead of powers of two.


def to_storage_terabits : BigFloat #

Convert to storage bytes and then multiply by 8.


def to_storage_terabytes : BigFloat #

Convert this number of bytes to the equivalent number of Terabytes. This uses the metric used by storage manufacturers to inflate their capacity values, by using powers of 10 instead of powers of two.


def to_storage_yottabits : BigFloat #

Convert to storage bytes and then multiply by 8.


def to_storage_yottabytes : BigFloat #

Convert this number of bytes to the equivalent number of Yottabytes. This uses the metric used by storage manufacturers to inflate their capacity values, by using powers of 10 instead of powers of two.


def to_storage_zettabits : BigFloat #

Convert to storage bytes and then multiply by 8.


def to_storage_zettabytes : BigFloat #

Convert this number of bytes to the equivalent number of Zettabytes. This uses the metric used by storage manufacturers to inflate their capacity values, by using powers of 10 instead of powers of two.


def to_tb_s #

Produce a string representing this byte value like "##TB".


def to_terabits : BigFloat #

Convert this number of bytes to the equivalent number of Terabits


def to_terabyte_s #

Produce a string representing this byte value like "## Terabytes".


def to_terabytes : BigFloat #

Convert this number of bytes to the equivalent number of Terabytes


def to_yb_s #

Produce a string representing this byte value like "##YB".


def to_yottabits : BigFloat #

Convert this number of bytes to the equivalent number of Yottabits


def to_yottabyte_s #

Produce a string representing this byte value like "## Yottabytes".


def to_yottabytes : BigFloat #

Convert this number of bytes to the equivalent number of Yottabytes


def to_zb_s #

Produce a string representing this byte value like "##ZB".


def to_zettabits : BigFloat #

Convert this number of bytes to the equivalent number of Zettabits


def to_zettabyte_s #

Produce a string representing this byte value like "## Zettabytes".


def to_zettabytes : BigFloat #

Convert this number of bytes to the equivalent number of Zettabytes


Macro Detail

macro method_missing(call) #