Class: WeatherCLI::Hourly

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

Class Method Summary collapse

Class Method Details

.display(zip = '72703') ⇒ Object



34
35
36
37
38
39
40
41
42
43
# File 'lib/weatherCLI.rb', line 34

def self.display(zip='72703')
    html = GatherData::WeatherChannelHourly.return_html(zip)
    weather_hashes = ParseData::WeatherChannelHourly.new(html).return_hash
    WeatherCard::Hourly.reset
    weather_hashes.each do |weather|
        day = Forecast::Day.new(weather)
        WeatherCard::Hourly.new(day)
    end
    WeatherCard::Hourly.display
end