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