- B
 - D
 - E
 - F
 - G
 - H
 - I
 - K
 - M
 - P
 - S
 - T
 - W
 - Z
 
Constants
| EXABYTE | = | PETABYTE * 1024 | 
| GIGABYTE | = | MEGABYTE * 1024 | 
| KILOBYTE | = | 1024 | 
| MEGABYTE | = | KILOBYTE * 1024 | 
| PETABYTE | = | TERABYTE * 1024 | 
| TERABYTE | = | GIGABYTE * 1024 | 
| ZETTABYTE | = | EXABYTE * 1024 | 
Instance Public methods
bytes() Link
Enables the use of byte calculations and declarations, like 45.bytes + 2.6.megabytes
2.bytes # => 2
            days() Link
Returns a Duration instance matching the number of days provided.
2.days # => 2 days
            exabytes() Link
Returns the number of bytes equivalent to the exabytes provided.
2.exabytes # => 2_305_843_009_213_693_952
            fortnights() Link
Returns a Duration instance matching the number of fortnights provided.
2.fortnights # => 4 weeks
            gigabytes() Link
Returns the number of bytes equivalent to the gigabytes provided.
2.gigabytes # => 2_147_483_648
            hours() Link
Returns a Duration instance matching the number of hours provided.
2.hours # => 2 hours
            html_safe?() Link
in_milliseconds() Link
Returns the number of milliseconds equivalent to the seconds provided. Used with the standard time durations.
2.in_milliseconds # => 2000
1.hour.in_milliseconds # => 3600000
            kilobytes() Link
Returns the number of bytes equivalent to the kilobytes provided.
2.kilobytes # => 2048
            megabytes() Link
Returns the number of bytes equivalent to the megabytes provided.
2.megabytes # => 2_097_152
            minutes() Link
Returns a Duration instance matching the number of minutes provided.
2.minutes # => 2 minutes
            petabytes() Link
Returns the number of bytes equivalent to the petabytes provided.
2.petabytes # => 2_251_799_813_685_248
            seconds() Link
Returns a Duration instance matching the number of seconds provided.
2.seconds # => 2 seconds
            terabytes() Link
Returns the number of bytes equivalent to the terabytes provided.
2.terabytes # => 2_199_023_255_552