Class: Navigator
- Inherits:
-
Object
- Object
- Navigator
- Defined in:
- lib/meteorologist/navigator.rb
Instance Method Summary collapse
- #coordinates ⇒ Object
-
#initialize(location, options = {}) ⇒ Navigator
constructor
A new instance of Navigator.
- #location_name ⇒ Object
Constructor Details
#initialize(location, options = {}) ⇒ Navigator
Returns a new instance of Navigator.
2 3 4 5 6 7 |
# File 'lib/meteorologist/navigator.rb', line 2 def initialize(location, = {}) @location = location @location_cache_class = .fetch(:location_cache) { LocationCache } @locator_class = .fetch(:locator) { Locator } fetch_cache_values end |
Instance Method Details
#coordinates ⇒ Object
9 10 11 |
# File 'lib/meteorologist/navigator.rb', line 9 def coordinates @coordinates ||= locator.coordinates end |
#location_name ⇒ Object
13 14 15 |
# File 'lib/meteorologist/navigator.rb', line 13 def location_name @location_name ||= locator.name end |