Contains a result from the Yahoo! Maps Traffic REST service.
Downloads the image (if there is one) to file
.
# File lib/ym4r/yahoo_maps/building_block/traffic.rb, line 92 def download_to(file) if has_image? data = open(image_url).read open(file,"wb") do |f| f.write data end end end
# File lib/ym4r/yahoo_maps/building_block/traffic.rb, line 101 def has_image? ! image_url.nil? end
Convenience method for the lazy.
# File lib/ym4r/yahoo_maps/building_block/traffic.rb, line 111 def latlon [latitude,longitude] end
Convenience method for the lazy.
# File lib/ym4r/yahoo_maps/building_block/traffic.rb, line 106 def lonlat [longitude,latitude] end