module UndergroundWeather class Webcam attr_reader :handle, :camid, :camindex, :station_id, :link, :linktext, :cameratype, :organization, :neighborhood, :zip, :city, :state, :country, :time_zone, :latitude, :longitude, :updated, :downloaded, :image, :image_thumb, :url def initialize(wc) @handle = wc['handle'] @camid = wc['camid'] @camindex = wc['camindex'] @station_id = wc['assoc_station_id'] @camera_type = wc['cameratype'] @link = wc['link'] @link_text = wc['link_text'] @organization = wc['organization'] @neighborhood = wc['neighborhood'] @zip = wc['zip'] @city = wc['city'] @state = wc['sate'] @country = wc['country'] @time_zone = wc['tzname'] @latitude = wc['lat'] @longitude = wc['lon'] @updated_at = wc['updated'] @downloaded_at = wc['downloaded'] @is_recent = wc['isrecent'] @image = wc['CURRENTIMAGEURL'] @image_thumb = wc['WIDGETCURRENTIMAGEURL'] @url = wc['CAMURL'] end def recent @is_recent == '1' ? true : false end alias_method(:recent?, :recent) end end