Class: WeatherWeasel::Almanac

Inherits:
Object
  • Object
show all
Defined in:
lib/weather_weasel/almanac.rb

Instance Method Summary collapse

Constructor Details

#initialize(city, state, tempature_format, client) ⇒ Almanac

Returns a new instance of Almanac.



4
5
6
7
8
9
# File 'lib/weather_weasel/almanac.rb', line 4

def initialize(city, state, tempature_format, client)
  @city = city
  @state = state
  @tempature_format = tempature_format
  @client = client
end

Instance Method Details

#raw_dataObject



11
12
13
# File 'lib/weather_weasel/almanac.rb', line 11

def raw_data
  @data ||= @client.parse_url("almanac/q/#{@state}/#{@city}.json")
end