Class: Windward::Weather
- Inherits:
-
Object
- Object
- Windward::Weather
- Defined in:
- lib/windward.rb
Overview
Instantiate an object to get meteo france previsions
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ Weather
constructor
A new instance of Weather.
- #previsions(name) ⇒ Object
- #region(name) ⇒ Object
- #regions ⇒ Object
- #reload ⇒ Object
Constructor Details
#initialize ⇒ Weather
10 11 12 13 14 |
# File 'lib/windward.rb', line 10 def initialize @departments = load_departments_data @cities = load_cities_data @regions = load_regions_data end |
Class Method Details
.root ⇒ Object
32 33 34 |
# File 'lib/windward.rb', line 32 def self.root File.('../..', __FILE__) end |
Instance Method Details
#previsions(name) ⇒ Object
24 25 26 |
# File 'lib/windward.rb', line 24 def previsions(name) @regions[name]['previsions'] end |
#region(name) ⇒ Object
20 21 22 |
# File 'lib/windward.rb', line 20 def region(name) @regions[name] end |
#regions ⇒ Object
16 17 18 |
# File 'lib/windward.rb', line 16 def regions @regions.keys end |
#reload ⇒ Object
28 29 30 |
# File 'lib/windward.rb', line 28 def reload @regions = load_data end |