Class: WeatherData::Humidity::Relative
- Inherits:
-
SimpleDelegator
- Object
- SimpleDelegator
- WeatherData::Humidity::Relative
- Defined in:
- lib/weather_data/humidity/relative.rb
Instance Method Summary collapse
-
#initialize(points) ⇒ Relative
constructor
A new instance of Relative.
- #to_s ⇒ Object
Constructor Details
#initialize(points) ⇒ Relative
Returns a new instance of Relative.
8 9 10 |
# File 'lib/weather_data/humidity/relative.rb', line 8 def initialize(points) super points.to_f end |
Instance Method Details
#to_s ⇒ Object
12 13 14 |
# File 'lib/weather_data/humidity/relative.rb', line 12 def to_s "#{percentage}%" end |