Class: WeatherGov::Product
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
#code ⇒ Object
13
14
15
|
# File 'lib/weather_gov/product.rb', line 13
def code
data.fetch("productCode")
end
|
#issuance_time ⇒ Object
9
10
11
|
# File 'lib/weather_gov/product.rb', line 9
def issuance_time
Time.parse(data.fetch("issuanceTime"))
end
|
#issuing_office ⇒ Object
5
6
7
|
# File 'lib/weather_gov/product.rb', line 5
def issuing_office
data.fetch("issuingOffice")
end
|
#name ⇒ Object
17
18
19
|
# File 'lib/weather_gov/product.rb', line 17
def name
data.fetch("productName")
end
|
#product ⇒ Object
25
26
27
|
# File 'lib/weather_gov/product.rb', line 25
def product
client.product(id: id) if id
end
|
#text ⇒ Object
21
22
23
|
# File 'lib/weather_gov/product.rb', line 21
def text
data.fetch("productText")
end
|