Class: UndergroundWeather::Webcam
- Inherits:
-
Object
- Object
- UndergroundWeather::Webcam
- Defined in:
- lib/undergroundweather/webcam.rb
Instance Attribute Summary collapse
-
#cameratype ⇒ Object
readonly
Returns the value of attribute cameratype.
-
#camid ⇒ Object
readonly
Returns the value of attribute camid.
-
#camindex ⇒ Object
readonly
Returns the value of attribute camindex.
-
#city ⇒ Object
readonly
Returns the value of attribute city.
-
#country ⇒ Object
readonly
Returns the value of attribute country.
-
#downloaded ⇒ Object
readonly
Returns the value of attribute downloaded.
-
#handle ⇒ Object
readonly
Returns the value of attribute handle.
-
#image ⇒ Object
readonly
Returns the value of attribute image.
-
#image_thumb ⇒ Object
readonly
Returns the value of attribute image_thumb.
-
#latitude ⇒ Object
readonly
Returns the value of attribute latitude.
-
#link ⇒ Object
readonly
Returns the value of attribute link.
-
#linktext ⇒ Object
readonly
Returns the value of attribute linktext.
-
#longitude ⇒ Object
readonly
Returns the value of attribute longitude.
-
#neighborhood ⇒ Object
readonly
Returns the value of attribute neighborhood.
-
#organization ⇒ Object
readonly
Returns the value of attribute organization.
-
#state ⇒ Object
readonly
Returns the value of attribute state.
-
#station_id ⇒ Object
readonly
Returns the value of attribute station_id.
-
#time_zone ⇒ Object
readonly
Returns the value of attribute time_zone.
-
#updated ⇒ Object
readonly
Returns the value of attribute updated.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
-
#zip ⇒ Object
readonly
Returns the value of attribute zip.
Instance Method Summary collapse
-
#initialize(wc) ⇒ Webcam
constructor
A new instance of Webcam.
- #recent ⇒ Object (also: #recent?)
Constructor Details
#initialize(wc) ⇒ Webcam
Returns a new instance of Webcam.
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/undergroundweather/webcam.rb', line 8 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 |
Instance Attribute Details
#cameratype ⇒ Object (readonly)
Returns the value of attribute cameratype.
3 4 5 |
# File 'lib/undergroundweather/webcam.rb', line 3 def cameratype @cameratype end |
#camid ⇒ Object (readonly)
Returns the value of attribute camid.
3 4 5 |
# File 'lib/undergroundweather/webcam.rb', line 3 def camid @camid end |
#camindex ⇒ Object (readonly)
Returns the value of attribute camindex.
3 4 5 |
# File 'lib/undergroundweather/webcam.rb', line 3 def camindex @camindex end |
#city ⇒ Object (readonly)
Returns the value of attribute city.
3 4 5 |
# File 'lib/undergroundweather/webcam.rb', line 3 def city @city end |
#country ⇒ Object (readonly)
Returns the value of attribute country.
3 4 5 |
# File 'lib/undergroundweather/webcam.rb', line 3 def country @country end |
#downloaded ⇒ Object (readonly)
Returns the value of attribute downloaded.
3 4 5 |
# File 'lib/undergroundweather/webcam.rb', line 3 def downloaded @downloaded end |
#handle ⇒ Object (readonly)
Returns the value of attribute handle.
3 4 5 |
# File 'lib/undergroundweather/webcam.rb', line 3 def handle @handle end |
#image ⇒ Object (readonly)
Returns the value of attribute image.
3 4 5 |
# File 'lib/undergroundweather/webcam.rb', line 3 def image @image end |
#image_thumb ⇒ Object (readonly)
Returns the value of attribute image_thumb.
3 4 5 |
# File 'lib/undergroundweather/webcam.rb', line 3 def image_thumb @image_thumb end |
#latitude ⇒ Object (readonly)
Returns the value of attribute latitude.
3 4 5 |
# File 'lib/undergroundweather/webcam.rb', line 3 def latitude @latitude end |
#link ⇒ Object (readonly)
Returns the value of attribute link.
3 4 5 |
# File 'lib/undergroundweather/webcam.rb', line 3 def link @link end |
#linktext ⇒ Object (readonly)
Returns the value of attribute linktext.
3 4 5 |
# File 'lib/undergroundweather/webcam.rb', line 3 def linktext @linktext end |
#longitude ⇒ Object (readonly)
Returns the value of attribute longitude.
3 4 5 |
# File 'lib/undergroundweather/webcam.rb', line 3 def longitude @longitude end |
#neighborhood ⇒ Object (readonly)
Returns the value of attribute neighborhood.
3 4 5 |
# File 'lib/undergroundweather/webcam.rb', line 3 def neighborhood @neighborhood end |
#organization ⇒ Object (readonly)
Returns the value of attribute organization.
3 4 5 |
# File 'lib/undergroundweather/webcam.rb', line 3 def organization @organization end |
#state ⇒ Object (readonly)
Returns the value of attribute state.
3 4 5 |
# File 'lib/undergroundweather/webcam.rb', line 3 def state @state end |
#station_id ⇒ Object (readonly)
Returns the value of attribute station_id.
3 4 5 |
# File 'lib/undergroundweather/webcam.rb', line 3 def station_id @station_id end |
#time_zone ⇒ Object (readonly)
Returns the value of attribute time_zone.
3 4 5 |
# File 'lib/undergroundweather/webcam.rb', line 3 def time_zone @time_zone end |
#updated ⇒ Object (readonly)
Returns the value of attribute updated.
3 4 5 |
# File 'lib/undergroundweather/webcam.rb', line 3 def updated @updated end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
3 4 5 |
# File 'lib/undergroundweather/webcam.rb', line 3 def url @url end |
#zip ⇒ Object (readonly)
Returns the value of attribute zip.
3 4 5 |
# File 'lib/undergroundweather/webcam.rb', line 3 def zip @zip end |
Instance Method Details
#recent ⇒ Object Also known as: recent?
38 39 40 |
# File 'lib/undergroundweather/webcam.rb', line 38 def recent @is_recent == '1' ? true : false end |