Class: WeatherHacks::LWWS::Location

Inherits:
Object
  • Object
show all
Defined in:
lib/weatherhacks/lwws.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(elt) ⇒ Location

Returns a new instance of Location.



50
51
52
53
54
# File 'lib/weatherhacks/lwws.rb', line 50

def initialize(elt)
  @area = elt.attributes["area"]
  @pref = elt.attributes["pref"]
  @city = elt.attributes["city"]
end

Instance Attribute Details

#areaObject (readonly)

Returns the value of attribute area.



49
50
51
# File 'lib/weatherhacks/lwws.rb', line 49

def area
  @area
end

#cityObject (readonly)

Returns the value of attribute city.



49
50
51
# File 'lib/weatherhacks/lwws.rb', line 49

def city
  @city
end

#prefObject (readonly)

Returns the value of attribute pref.



49
50
51
# File 'lib/weatherhacks/lwws.rb', line 49

def pref
  @pref
end