Class: WeatherGov::AlertCollection
Instance Attribute Summary
Attributes inherited from Feature
#client
Class Method Summary
collapse
Instance Method Summary
collapse
#features
Methods inherited from Feature
#context, #data, #geometry, #id, #initialize, #properties, #type
Class Method Details
.feature_class ⇒ Object
8
9
10
|
# File 'lib/weather_gov/alert_collection.rb', line 8
def self.feature_class
Alert
end
|
Instance Method Details
#alerts ⇒ Object
20
21
22
|
# File 'lib/weather_gov/alert_collection.rb', line 20
def alerts
features
end
|
#summary ⇒ Object
24
25
26
|
# File 'lib/weather_gov/alert_collection.rb', line 24
def summary
features.map(&:summary_hash)
end
|
#title ⇒ Object
16
17
18
|
# File 'lib/weather_gov/alert_collection.rb', line 16
def title
data.fetch("title")
end
|
#update_time ⇒ Object
12
13
14
|
# File 'lib/weather_gov/alert_collection.rb', line 12
def update_time
@update_time ||= Time.parse(data.fetch("updated"))
end
|