Class: Redlink::Weather
Instance Attribute Summary collapse
-
#condition ⇒ Object
Returns the value of attribute condition.
-
#humidity ⇒ Object
Returns the value of attribute humidity.
-
#is_defined ⇒ Object
Returns the value of attribute is_defined.
-
#is_valid ⇒ Object
Returns the value of attribute is_valid.
-
#phrase_key ⇒ Object
Returns the value of attribute phrase_key.
-
#temp_unit ⇒ Object
Returns the value of attribute temp_unit.
-
#temperature ⇒ Object
Returns the value of attribute temperature.
Instance Method Summary collapse
Methods inherited from Redthing
Constructor Details
This class inherits a constructor from Redlink::Redthing
Instance Attribute Details
#condition ⇒ Object
Returns the value of attribute condition.
5 6 7 |
# File 'lib/redlink/weather.rb', line 5 def condition @condition end |
#humidity ⇒ Object
Returns the value of attribute humidity.
5 6 7 |
# File 'lib/redlink/weather.rb', line 5 def humidity @humidity end |
#is_defined ⇒ Object
Returns the value of attribute is_defined.
5 6 7 |
# File 'lib/redlink/weather.rb', line 5 def is_defined @is_defined end |
#is_valid ⇒ Object
Returns the value of attribute is_valid.
5 6 7 |
# File 'lib/redlink/weather.rb', line 5 def is_valid @is_valid end |
#phrase_key ⇒ Object
Returns the value of attribute phrase_key.
5 6 7 |
# File 'lib/redlink/weather.rb', line 5 def phrase_key @phrase_key end |
#temp_unit ⇒ Object
Returns the value of attribute temp_unit.
5 6 7 |
# File 'lib/redlink/weather.rb', line 5 def temp_unit @temp_unit end |
#temperature ⇒ Object
Returns the value of attribute temperature.
5 6 7 |
# File 'lib/redlink/weather.rb', line 5 def temperature @temperature end |
Instance Method Details
#to_s ⇒ Object
7 8 9 10 11 12 13 |
# File 'lib/redlink/weather.rb', line 7 def to_s if is_defined && is_valid "#{temperature.to_i}° #{condition}" else "" end end |