class OpenWeatherApi::Forecast
Public Class Methods
new(forecast)
click to toggle source
# File lib/open_weather_api/forecast.rb, line 3 def initialize(forecast) @forecast_hash = forecast.parsed_response end
Public Instance Methods
[](key)
click to toggle source
# File lib/open_weather_api/forecast.rb, line 7 def [](key) @forecast_hash[key] end
method_missing(name, *args, &block)
click to toggle source
Calls superclass method
# File lib/open_weather_api/forecast.rb, line 11 def method_missing(name, *args, &block) if @forecast_hash.respond_to? name @forecast_hash.send(name) elsif @forecast_hash.has_key?(name.to_s) @forecast_hash[name.to_s] else super end end