Class: Weather

Inherits:
Weatherzone::Resource show all
Includes:
Weatherzone::Finder
Defined in:
lib/weatherzone/resources/weather.rb

Constant Summary

Constants included from Weatherzone::Finder

Weatherzone::Finder::INCLUDES_MAP

Instance Method Summary collapse

Methods included from Weatherzone::Finder

included

Methods inherited from Weatherzone::Resource

has_attribute, has_elements, inherited, #settings

Instance Method Details

#first_locationObject



7
8
9
# File 'lib/weatherzone/resources/weather.rb', line 7

def first_location
  countries.first.locations.first
end

#has_locations?Boolean

Returns:

  • (Boolean)


11
12
13
# File 'lib/weatherzone/resources/weather.rb', line 11

def has_locations?
  countries.any? && countries.first.locations.any?
end