Mixin for Numeric to make working with bits and bytes easier. These are numerous and therefore provided via a mega-module called BinaryMultiplers, rather then individual nano-methods.

  1.byte               #=> 8
  2.bytes              #=> 16
  1.kilobit            #=> 1024
  1.kilobyte           #=> 8192
Methods
Public Instance methods
bit() [ source ]

Measure in bits.

This method is also aliased as bits
bits()

Alias for bit

byte() [ source ]

Bytes are converted to bits.

This method is also aliased as bytes
bytes()

Alias for byte

exabit() [ source ]
This method is also aliased as exabits
exabits()

Alias for exabit

exabyte() [ source ]
This method is also aliased as exabytes
exabytes()

Alias for exabyte

exbi() [ source ]
gibi() [ source ]
gigabit() [ source ]
This method is also aliased as gigabits
gigabits()

Alias for gigabit

gigabyte() [ source ]
This method is also aliased as gigabytes
gigabytes()

Alias for gigabyte

in_bits() [ source ]

Define inverse functions?

in_bytes() [ source ]

Define inverse functions?

in_exabits() [ source ]
in_exabytes() [ source ]
in_gigabits() [ source ]
in_gigabytes() [ source ]
in_kilobits() [ source ]
in_kilobytes() [ source ]
in_megabits() [ source ]
in_megabytes() [ source ]
in_petabits() [ source ]
in_petabytes() [ source ]
in_terabits() [ source ]
in_terabytes() [ source ]
kibi() [ source ]

SI Binary Multiplers (also available from Multipliers)

kilobit() [ source ]
This method is also aliased as kilobits
kilobits()

Alias for kilobit

kilobyte() [ source ]
This method is also aliased as kilobytes
kilobytes()

Alias for kilobyte

mebi() [ source ]
megabit() [ source ]
This method is also aliased as megabits
megabits()

Alias for megabit

megabyte() [ source ]
This method is also aliased as megabytes
megabytes()

Alias for megabyte

pebi() [ source ]
petabit() [ source ]
This method is also aliased as petabits
petabits()

Alias for petabit

petabyte() [ source ]
This method is also aliased as petabytes
petabytes()

Alias for petabyte

tebi() [ source ]
terabit() [ source ]
terabyte() [ source ]