Class: WeatherGov::Office
Instance Attribute Summary
Attributes inherited from Feature
#client
Instance Method Summary
collapse
Methods inherited from Feature
#context, #data, #geometry, #id, #initialize, #properties, #type
Instance Method Details
#address ⇒ Object
12
13
14
|
# File 'lib/weather_gov/office.rb', line 12
def address
@address ||= Address.new(data.fetch("address"))
end
|
#approved_observation_station_ids ⇒ Object
64
65
66
|
# File 'lib/weather_gov/office.rb', line 64
def approved_observation_station_ids
data.fetch("approvedObservationStations", []).map { |uri| Identifier::Station.new(uri).id }
end
|
#approved_observation_stations ⇒ Object
60
61
62
|
# File 'lib/weather_gov/office.rb', line 60
def approved_observation_stations
data.fetch("approvedObservationStations", []).map { |uri| client.station(uri: uri, value: uri) }
end
|
#email ⇒ Object
24
25
26
|
# File 'lib/weather_gov/office.rb', line 24
def email
data.fetch("email")
end
|
#fax ⇒ Object
20
21
22
|
# File 'lib/weather_gov/office.rb', line 20
def fax
data.fetch("faxNumber")
end
|
#name ⇒ Object
8
9
10
|
# File 'lib/weather_gov/office.rb', line 8
def name
data.fetch("name")
end
|
#nws_region ⇒ Object
28
29
30
|
# File 'lib/weather_gov/office.rb', line 28
def nws_region
data.fetch("nwsRegion")
end
|
#parent_organization ⇒ Object
32
33
34
|
# File 'lib/weather_gov/office.rb', line 32
def parent_organization
data.fetch("parentOrganization")
end
|
#responsible_counties ⇒ Object
36
37
38
|
# File 'lib/weather_gov/office.rb', line 36
def responsible_counties
data.fetch("responsibleCounties", [])
end
|
#responsible_county_ids ⇒ Object
40
41
42
|
# File 'lib/weather_gov/office.rb', line 40
def responsible_county_ids
data.fetch("responsibleCounties", []).map { |uri| Identifier::CountyZone.new(uri).id }
end
|
#responsible_fire_zone_ids ⇒ Object
56
57
58
|
# File 'lib/weather_gov/office.rb', line 56
def responsible_fire_zone_ids
data.fetch("responsibleFireZones", []).map { |uri| Identifier::FireZone.new(uri).id }
end
|
#responsible_fire_zones ⇒ Object
52
53
54
|
# File 'lib/weather_gov/office.rb', line 52
def responsible_fire_zones
data.fetch("responsibleFireZones", [])
end
|
#responsible_forecast_zone_ids ⇒ Object
48
49
50
|
# File 'lib/weather_gov/office.rb', line 48
def responsible_forecast_zone_ids
data.fetch("responsibleForecastZones", []).map { |uri| Identifier::ForecastZone.new(uri).id }
end
|
#responsible_forecast_zones ⇒ Object
44
45
46
|
# File 'lib/weather_gov/office.rb', line 44
def responsible_forecast_zones
data.fetch("responsibleForecastZones", [])
end
|
#telephone ⇒ Object
16
17
18
|
# File 'lib/weather_gov/office.rb', line 16
def telephone
data.fetch("telephone")
end
|