struct

MemoryConversion::Bytes

Inherits Struct < Value < Object

Constructors

new(value)
Source

Instance methods

to_b_s

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

Source
to_bits

Convert this number of bytes to the equivalent number of bits

Source
to_byte_s

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

Source
to_bytes

Convert this number of bytes to the equivalent number of bytes

Source
to_eb_s

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

Source
to_exabits

Convert this number of bytes to the equivalent number of Exabits

Source
to_exabyte_s

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

Source
to_exabytes

Convert this number of bytes to the equivalent number of Exabytes

Source
to_gb_s

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

Source
to_gigabits

Convert this number of bytes to the equivalent number of Gigabits

Source
to_gigabyte_s

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

Source
to_gigabytes

Convert this number of bytes to the equivalent number of Gigabytes

Source
to_kb_s

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

Source
to_kilobits

Convert this number of bytes to the equivalent number of kilobits

Source
to_kilobyte_s

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

Source
to_kilobytes

Convert this number of bytes to the equivalent number of kilobytes

Source
to_mb_s

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

Source
to_megabits

Convert this number of bytes to the equivalent number of Megabits

Source
to_megabyte_s

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

Source
to_megabytes

Convert this number of bytes to the equivalent number of Megabytes

Source
to_pb_s

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

Source
to_petabits

Convert this number of bytes to the equivalent number of Petabits

Source
to_petabyte_s

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

Source
to_petabytes

Convert this number of bytes to the equivalent number of Petabytes

Source
to_s(scale : Symbol | Nil = nil)

Returns a nicely readable and concise string representation of this object, typically intended for users.

This method should usually not be overridden. It delegates to #to_s(IO) which can be overridden for custom implementations.

Also see #inspect.

Source
to_storage_bits

Convert to storage bytes and then multiply by 8.

Source
to_storage_bytes

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.

Source
to_storage_exabits

Convert to storage bytes and then multiply by 8.

Source
to_storage_exabytes

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.

Source
to_storage_gigabits

Convert to storage bytes and then multiply by 8.

Source
to_storage_gigabytes

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.

Source
to_storage_kilobits

Convert to storage bytes and then multiply by 8.

Source
to_storage_kilobytes

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.

Source
to_storage_megabits

Convert to storage bytes and then multiply by 8.

Source
to_storage_megabytes

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.

Source
to_storage_petabits

Convert to storage bytes and then multiply by 8.

Source
to_storage_petabytes

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.

Source
to_storage_terabits

Convert to storage bytes and then multiply by 8.

Source
to_storage_terabytes

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.

Source
to_storage_yottabits

Convert to storage bytes and then multiply by 8.

Source
to_storage_yottabytes

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.

Source
to_storage_zettabits

Convert to storage bytes and then multiply by 8.

Source
to_storage_zettabytes

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.

Source
to_tb_s

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

Source
to_terabits

Convert this number of bytes to the equivalent number of Terabits

Source
to_terabyte_s

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

Source
to_terabytes

Convert this number of bytes to the equivalent number of Terabytes

Source
to_yb_s

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

Source
to_yottabits

Convert this number of bytes to the equivalent number of Yottabits

Source
to_yottabyte_s

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

Source
to_yottabytes

Convert this number of bytes to the equivalent number of Yottabytes

Source
to_zb_s

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

Source
to_zettabits

Convert this number of bytes to the equivalent number of Zettabits

Source
to_zettabyte_s

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

Source
to_zettabytes

Convert this number of bytes to the equivalent number of Zettabytes

Source

Macros

method_missing(call)
Source