class WeatherGov::Point

Public Instance Methods

alerts_active() click to toggle source
# File lib/weather_gov/point.rb, line 56
def alerts_active
  @alerts_active ||= client.alerts_active(zone: forecast_zone_identifier.id)
end
county_zone() click to toggle source
# File lib/weather_gov/point.rb, line 28
def county_zone
  @county_zone ||= client.zone(uri: county_zone_identifier.uri)
end
county_zone_identifier() click to toggle source
# File lib/weather_gov/point.rb, line 24
def county_zone_identifier
  @county_zone_identifier ||= Identifier::CountyZone.new(properties.fetch("county"))
end
fire_zone() click to toggle source
# File lib/weather_gov/point.rb, line 36
def fire_zone
  @fire_zone ||= client.zone(uri: fire_zone_identifier.uri)
end
fire_zone_identifier() click to toggle source
# File lib/weather_gov/point.rb, line 32
def fire_zone_identifier
  @fire_zone_identifier ||= Identifier::FireZone.new(properties.fetch("fireWeatherZone"))
end
forecast() click to toggle source
# File lib/weather_gov/point.rb, line 64
def forecast
  @forecast ||= client.forecast(uri: properties.fetch("forecast"))
end
forecast_grid_data() click to toggle source
# File lib/weather_gov/point.rb, line 40
def forecast_grid_data
  @forecast_grid_data ||= Identifier::Gridpoint.new(properties.fetch("forecastGridData"))
end
forecast_hourly() click to toggle source
# File lib/weather_gov/point.rb, line 68
def forecast_hourly
  @forecast_hourly ||= client.forecast(uri: properties.fetch("forecastHourly"))
end
forecast_office() click to toggle source
# File lib/weather_gov/point.rb, line 12
def forecast_office
  @forecast_office ||= client.office(uri: forecast_office_identifier.uri)
end
forecast_office_identifier() click to toggle source
# File lib/weather_gov/point.rb, line 8
def forecast_office_identifier
  @forecast_office_identifier ||= Identifier::Office.new(properties.fetch("forecastOffice"))
end
forecast_zone() click to toggle source
# File lib/weather_gov/point.rb, line 20
def forecast_zone
  @forecast_zone ||= client.zone(uri: forecast_zone_identifier.uri)
end
forecast_zone_identifier() click to toggle source
# File lib/weather_gov/point.rb, line 16
def forecast_zone_identifier
  @forecast_zone_identifier ||= Identifier::ForecastZone.new(properties.fetch("forecastZone"))
end
gridpoint() click to toggle source
# File lib/weather_gov/point.rb, line 60
def gridpoint
  @gridpoint ||= client.gridpoint(uri: properties.fetch("forecastGridData"))
end
observation_stations() click to toggle source
# File lib/weather_gov/point.rb, line 52
def observation_stations
  @observation_stations ||= client.stations(uri: properties.fetch("observationStations"))
end
product(type) click to toggle source
# File lib/weather_gov/point.rb, line 77
def product(type)
  products(type).first.product
end
products(type) click to toggle source
# File lib/weather_gov/point.rb, line 72
def products(type)
  @products ||= {}
  @products[type] ||= client.products(type: type, location: forecast_office_identifier.id)
end
radar_station() click to toggle source
# File lib/weather_gov/point.rb, line 48
def radar_station
  properties.fetch("radarStation")
end
relative_location() click to toggle source
# File lib/weather_gov/point.rb, line 44
def relative_location
  @relative_location ||= RelativeLocation.new(client: client, data: properties.fetch("relativeLocation"))
end