Sha256: 19f4b48b2eabaae5ebbe2664ed6f89e862a2acba4b6d8c633e73eb0a74391bcc

Contents?: true

Size: 414 Bytes

Versions: 2

Compression:

Stored size: 414 Bytes

Contents

# encoding: utf-8

module SI
  PREFIXES = {
    -8 => 'y',
    -7 => 'z',
    -6 => 'a',
    -5 => 'f',
    -4 => 'p',
    -3 => 'n',
    -2 => 'μ',
    -1 => 'm',
     0 => '',
     1 => 'k',
     2 => 'M',
     3 => 'G',
     4 => 'T',
     5 => 'P',
     6 => 'E',
     7 => 'Z',
     8 => 'Y'
  }

  DEFAULT = {
    :length  =>    3,
    :base    => 1000,
    :min_exp =>   -8,
    :max_exp =>    8,
  }
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
si-0.2.0 lib/si/constants.rb
si-0.1.4 lib/si/constants.rb