abstract struct Number
- Number
- Value
- Object
Overview
The top-level number type.
Included Modules
- Comparable(Number)
- Steppable
Defined in:
wrench/humanize.crConstant Summary
-
SIZE_PREFIXES =
{ {" Bytes", " KiloBytes", " MegaBytes", " GigaBytes", " TeraBytes", " PetaBytes", " ExaBytes", " ZettaBytes", " YottaBytes"}, {" Bytes", " KiloBytes", " MegaBytes", " GigaBytes", " TeraBytes", " PetaBytes", " ExaBytes", " ZettaBytes", " YottaBytes"} }
Class Method Summary
-
.si_prefix(magnitude : Int, prefixes = SI_PREFIXES) : Char | String | Nil
Returns the SI prefix for magnitude.
Class Method Detail
def self.si_prefix(magnitude : Int, prefixes = SI_PREFIXES) : Char | String | Nil
#
Returns the SI prefix for magnitude.
Number.si_prefix(3) # => 'k'