Class: Height::Units::Centimeters
- Inherits:
-
Base
- Object
- Base
- Height::Units::Centimeters
show all
- Defined in:
- lib/height/units/centimeters.rb
Instance Attribute Summary
Attributes inherited from Base
#value
Instance Method Summary
collapse
Methods inherited from Base
#*, #+, #-, #/, #<=>, #initialize, round_value, #to_unit
Instance Method Details
#to_centimeters ⇒ Object
10
11
12
|
# File 'lib/height/units/centimeters.rb', line 10
def to_centimeters
self
end
|
#to_feet ⇒ Object
22
23
24
|
# File 'lib/height/units/centimeters.rb', line 22
def to_feet
to_inches.to_feet
end
|
#to_inches ⇒ Object
18
19
20
|
# File 'lib/height/units/centimeters.rb', line 18
def to_inches
to_millimeters.to_inches
end
|
#to_meters ⇒ Object
14
15
16
|
# File 'lib/height/units/centimeters.rb', line 14
def to_meters
to_millimeters.to_meters
end
|
#to_s ⇒ Object
26
27
28
|
# File 'lib/height/units/centimeters.rb', line 26
def to_s
value.round.to_s
end
|