class WeatherGov::Zone
Public Instance Methods
effective_date()
click to toggle source
# File lib/weather_gov/zone.rb, line 17 def effective_date Time.parse(properties.fetch("effectiveDate")) end
expiration()
click to toggle source
# File lib/weather_gov/zone.rb, line 21 def expiration Time.parse(properties.fetch("expirationDate")) end
forecast_office_identifiers()
click to toggle source
# File lib/weather_gov/zone.rb, line 25 def forecast_office_identifiers properties.fetch("forecastOffices", []).map { |uri| Identifier::Office.new(uri) } end
forecast_offices()
click to toggle source
# File lib/weather_gov/zone.rb, line 29 def forecast_offices forecast_office_identifiers.map { |identifier| client.office(uri: identifier.uri) } end
name()
click to toggle source
# File lib/weather_gov/zone.rb, line 9 def name properties.fetch("name") end
state()
click to toggle source
# File lib/weather_gov/zone.rb, line 13 def state properties.fetch("state") end
type()
click to toggle source
# File lib/weather_gov/zone.rb, line 5 def type properties.fetch("type") end