Sha256: c6a09709ffb8f8872842c557fa28162bc559821ca06124f56526e79cd16ace8c

Contents?: true

Size: 406 Bytes

Versions: 10

Compression:

Stored size: 406 Bytes

Contents

class YahooWeather::Forecast
  attr_reader :date, :high, :low, :text, :day

  def initialize(payload)
    @date = Date.parse(payload['date'])
    @text = payload['text']
    @day  = payload['day']
    @code = payload['code'].to_i
    @high = payload['high'].to_i
    @low  = payload['low'].to_i
  end

  def code(u='integer')
    return @code if u == 'integer'
    YahooWeather.code_string(@code)
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
yahoo_weather-1.1.1 lib/yahoo_weather/forecast.rb
yahoo_weather-1.1.0 lib/yahoo_weather/forecast.rb
yahoo_weather-1.0.7 lib/yahoo_weather/forecast.rb
yahoo_weather-1.0.6 lib/yahoo_weather/forecast.rb
yahoo_weather-1.0.5 lib/yahoo_weather/forecast.rb
yahoo_weather-1.0.4 lib/yahoo_weather/forecast.rb
yahoo_weather-1.0.3 lib/yahoo_weather/forecast.rb
yahoo_weather-1.0.2 lib/yahoo_weather/forecast.rb
yahoo_weather-1.0.1 lib/yahoo_weather/forecast.rb
yahoo_weather-1.0.0 lib/yahoo_weather/forecast.rb