Sha256: eda8c99d2741fd59636c8b0552494aec365bef529f48ac895dd23b370e035d7e
Contents?: true
Size: 466 Bytes
Versions: 21
Compression:
Stored size: 466 Bytes
Contents
#encoding: utf-8 module WeatherFetcher class Provider::Noaa < MetarProvider def url_for_metar(metar_city) u = "http://weather.noaa.gov/pub/data/observations/metar/stations/#{metar_city.upcase}.TXT" return u end def process(string) string.gsub!(/\d{4}\/\d{1,2}\/\d{1,2} \d{1,2}\:\d{1,2}\s*/, ' ') string.gsub!(/\n/, ' ') string.gsub!(/\t/, ' ') string.gsub!(/\s{2,}/, ' ') string.strip end end end
Version data entries
21 entries across 21 versions & 1 rubygems