Module: Kibi::Units
- Included in:
- Kibi
- Defined in:
- lib/kibi/units.rb
Instance Method Summary collapse
- #exbibyte ⇒ Object (also: #exabyte)
- #exbibytes(value) ⇒ Object (also: #exabytes)
- #gibibyte ⇒ Object (also: #gigabyte)
- #gibibytes(value) ⇒ Object (also: #gigabytes)
- #kibibyte ⇒ Object (also: #kilobyte)
- #kibibytes(value) ⇒ Object (also: #kilobytes)
- #mebibyte ⇒ Object (also: #megabyte)
- #mebibytes(value) ⇒ Object (also: #megabytes)
- #pebibyte ⇒ Object (also: #petabyte)
- #pebibytes(value) ⇒ Object (also: #petabytes)
- #tebibyte ⇒ Object (also: #terabyte)
- #tebibytes(value) ⇒ Object (also: #terabytes)
- #yobibyte ⇒ Object (also: #yottabyte)
- #yobibytes(value) ⇒ Object (also: #yottabytes)
- #zebibyte ⇒ Object (also: #zettabyte)
- #zebibytes(value) ⇒ Object (also: #zettabytes)
Instance Method Details
#exbibyte ⇒ Object Also known as: exabyte
54 55 56 |
# File 'lib/kibi/units.rb', line 54 def exbibyte 2 ** 60 end |
#exbibytes(value) ⇒ Object Also known as: exabytes
59 60 61 |
# File 'lib/kibi/units.rb', line 59 def exbibytes value value * exbibyte end |
#gibibyte ⇒ Object Also known as: gigabyte
24 25 26 |
# File 'lib/kibi/units.rb', line 24 def gibibyte 2 ** 30 end |
#gibibytes(value) ⇒ Object Also known as: gigabytes
29 30 31 |
# File 'lib/kibi/units.rb', line 29 def gibibytes value value * gibibyte end |
#kibibyte ⇒ Object Also known as: kilobyte
4 5 6 |
# File 'lib/kibi/units.rb', line 4 def kibibyte 2 ** 10 end |
#kibibytes(value) ⇒ Object Also known as: kilobytes
9 10 11 |
# File 'lib/kibi/units.rb', line 9 def kibibytes value value * kibibyte end |
#mebibyte ⇒ Object Also known as: megabyte
14 15 16 |
# File 'lib/kibi/units.rb', line 14 def mebibyte 2 ** 20 end |
#mebibytes(value) ⇒ Object Also known as: megabytes
19 20 21 |
# File 'lib/kibi/units.rb', line 19 def mebibytes value value * mebibyte end |
#pebibyte ⇒ Object Also known as: petabyte
44 45 46 |
# File 'lib/kibi/units.rb', line 44 def pebibyte 2 ** 50 end |
#pebibytes(value) ⇒ Object Also known as: petabytes
49 50 51 |
# File 'lib/kibi/units.rb', line 49 def pebibytes value value * pebibyte end |
#tebibyte ⇒ Object Also known as: terabyte
34 35 36 |
# File 'lib/kibi/units.rb', line 34 def tebibyte 2 ** 40 end |
#tebibytes(value) ⇒ Object Also known as: terabytes
39 40 41 |
# File 'lib/kibi/units.rb', line 39 def tebibytes value value * tebibyte end |
#yobibyte ⇒ Object Also known as: yottabyte
74 75 76 |
# File 'lib/kibi/units.rb', line 74 def yobibyte 2 ** 80 end |
#yobibytes(value) ⇒ Object Also known as: yottabytes
79 80 81 |
# File 'lib/kibi/units.rb', line 79 def yobibytes value value * yobibyte end |
#zebibyte ⇒ Object Also known as: zettabyte
64 65 66 |
# File 'lib/kibi/units.rb', line 64 def zebibyte 2 ** 70 end |
#zebibytes(value) ⇒ Object Also known as: zettabytes
69 70 71 |
# File 'lib/kibi/units.rb', line 69 def zebibytes value value * zebibyte end |