Class: WeatherHacks::ForecastMap::Area

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, rss) ⇒ Area

Returns a new instance of Area.



5
6
7
8
9
# File 'lib/weatherhacks.rb', line 5

def initialize(name, rss)
  @name = name
  @rss = rss
  @prefs = []
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



4
5
6
# File 'lib/weatherhacks.rb', line 4

def name
  @name
end

#prefsObject (readonly)

Returns the value of attribute prefs.



4
5
6
# File 'lib/weatherhacks.rb', line 4

def prefs
  @prefs
end

#rssObject (readonly)

Returns the value of attribute rss.



4
5
6
# File 'lib/weatherhacks.rb', line 4

def rss
  @rss
end

Instance Method Details

#pref(name, &block) ⇒ Object



11
12
13
14
15
16
# File 'lib/weatherhacks.rb', line 11

def pref(name, &block)
  pref = Pref.new(name)
  pref.instance_eval(&block)
  @prefs << pref
  PREF[pref.name] = pref
end