class GeekWeather::CLI
Public Instance Methods
forecast(days_offset=0)
click to toggle source
# File lib/geek_weather/cli.rb, line 11 def forecast(days_offset=0) ENV['WUNDERGROUND_API_KEY'] = options[:api_key] if options.has_key?("api_key")#"d5343d7f721568c4" day_forecast = Forecast.new.call(country_code: options[:country_code], city_name: options[:city_name], forecast_offset: days_offset.to_i) print day_forecast.to_s end
forecast_icon(days_offset=0)
click to toggle source
# File lib/geek_weather/cli.rb, line 21 def forecast_icon(days_offset=0) ENV['WUNDERGROUND_API_KEY'] = options[:api_key] if options.has_key?("api_key")#"d5343d7f721568c4" day_forecast = Forecast.new.call(country_code: options[:country_code], city_name: options[:city_name], forecast_offset: days_offset.to_i) print day_forecast.icon_url end