Class: Weatherboy::Webcam

Inherits:
Object
  • Object
show all
Defined in:
lib/weatherboy/webcam.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(doc) ⇒ Webcam

Returns a new instance of Webcam.



5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/weatherboy/webcam.rb', line 5

def initialize(doc)
  @handle = doc.elements['handle'].text
  @camid = doc.elements['camid'].text
  @assoc_station_id = doc.elements['assoc_station_id'].text
  @link = doc.elements['link'].text
  @link_text = doc.elements['linktext'].text
  @organization = doc.elements['organization'].text
  @cameratype = doc.elements['cameratype'].text
  @neighborhood = doc.elements['neighborhood'].text
  @zip = doc.elements['zip'].text
  @city = doc.elements['city'].text
  @state = doc.elements['state'].text
  @country = doc.elements['country'].text
  @updated = doc.elements['updated'].text
  @image_url = doc.elements['CURRENTIMAGEURL'].text
  @widget_url = doc.elements['WIDGETCURRENTIMAGEURL'].text
  @cam_url = doc.elements['CAMURL'].text
end

Instance Attribute Details

#assoc_station_idObject (readonly)

Returns the value of attribute assoc_station_id.



3
4
5
# File 'lib/weatherboy/webcam.rb', line 3

def assoc_station_id
  @assoc_station_id
end

#cam_urlObject (readonly)

Returns the value of attribute cam_url.



3
4
5
# File 'lib/weatherboy/webcam.rb', line 3

def cam_url
  @cam_url
end

#cameratypeObject (readonly)

Returns the value of attribute cameratype.



3
4
5
# File 'lib/weatherboy/webcam.rb', line 3

def cameratype
  @cameratype
end

#camidObject (readonly)

Returns the value of attribute camid.



3
4
5
# File 'lib/weatherboy/webcam.rb', line 3

def camid
  @camid
end

#cityObject (readonly)

Returns the value of attribute city.



3
4
5
# File 'lib/weatherboy/webcam.rb', line 3

def city
  @city
end

#countryObject (readonly)

Returns the value of attribute country.



3
4
5
# File 'lib/weatherboy/webcam.rb', line 3

def country
  @country
end

#handleObject (readonly)

Returns the value of attribute handle.



3
4
5
# File 'lib/weatherboy/webcam.rb', line 3

def handle
  @handle
end

#image_urlObject (readonly)

Returns the value of attribute image_url.



3
4
5
# File 'lib/weatherboy/webcam.rb', line 3

def image_url
  @image_url
end

Returns the value of attribute link.



3
4
5
# File 'lib/weatherboy/webcam.rb', line 3

def link
  @link
end

Returns the value of attribute link_text.



3
4
5
# File 'lib/weatherboy/webcam.rb', line 3

def link_text
  @link_text
end

#neighborhoodObject (readonly)

Returns the value of attribute neighborhood.



3
4
5
# File 'lib/weatherboy/webcam.rb', line 3

def neighborhood
  @neighborhood
end

#organizationObject (readonly)

Returns the value of attribute organization.



3
4
5
# File 'lib/weatherboy/webcam.rb', line 3

def organization
  @organization
end

#stateObject (readonly)

Returns the value of attribute state.



3
4
5
# File 'lib/weatherboy/webcam.rb', line 3

def state
  @state
end

#updatedObject (readonly)

Returns the value of attribute updated.



3
4
5
# File 'lib/weatherboy/webcam.rb', line 3

def updated
  @updated
end

#widget_urlObject (readonly)

Returns the value of attribute widget_url.



3
4
5
# File 'lib/weatherboy/webcam.rb', line 3

def widget_url
  @widget_url
end

#zipObject (readonly)

Returns the value of attribute zip.



3
4
5
# File 'lib/weatherboy/webcam.rb', line 3

def zip
  @zip
end