Class: Humanize::Kilo
Constant Summary
Constants inherited
from Bytes
Bytes::VERSION
Instance Method Summary
collapse
Methods inherited from Bytes
#initialize, #to_s, #value
Instance Method Details
#to_b ⇒ Object
3
4
5
|
# File 'lib/humanize/kilo.rb', line 3
def to_b
Byte.new @value * 1024
end
|
#to_g ⇒ Object
15
16
17
|
# File 'lib/humanize/kilo.rb', line 15
def to_g
Giga.new @value / 1024.0 / 1024
end
|
#to_k ⇒ Object
7
8
9
|
# File 'lib/humanize/kilo.rb', line 7
def to_k
self
end
|
#to_m ⇒ Object
11
12
13
|
# File 'lib/humanize/kilo.rb', line 11
def to_m
Mega.new @value / 1024.0
end
|