Class: Everlog::Dom::Value::Weather

Inherits:
Everlog::Dom::Value show all
Includes:
Maybe
Defined in:
lib/everlog/dom/value/weather.rb

Instance Method Summary collapse

Methods included from Maybe

#maybe

Methods inherited from Everlog::Dom::Value

#initialize, #parse_to_His

Constructor Details

This class inherits a constructor from Everlog::Dom::Value

Instance Method Details

#conditionObject



13
14
15
16
# File 'lib/everlog/dom/value/weather.rb', line 13

def condition
  cond = maybe(icons.each.max).to_s
  cond == 'unknown' ? 'sunny' : cond
end

#max_tempObject



5
6
7
# File 'lib/everlog/dom/value/weather.rb', line 5

def max_temp
  maybe(tempms.each.max).to_i
end

#min_tempObject



9
10
11
# File 'lib/everlog/dom/value/weather.rb', line 9

def min_temp
  maybe(tempms.each.min).to_i
end