Class: WeatherGov::Identifier::Gridpoint
Constant Summary
TYPES
Instance Attribute Summary
#uri
Class Method Summary
collapse
Instance Method Summary
collapse
#id, #initialize, parse, #to_s
Class Method Details
.base_uri ⇒ Object
8
9
10
|
# File 'lib/weather_gov/identifier/gridpoint.rb', line 8
def self.base_uri
URI.join(super, "/gridpoints/").to_s
end
|
Instance Method Details
#grid_id ⇒ Object
16
17
18
|
# File 'lib/weather_gov/identifier/gridpoint.rb', line 16
def grid_id
@grid_id ||= id.split("/")[1]
end
|
#grid_x ⇒ Object
20
21
22
|
# File 'lib/weather_gov/identifier/gridpoint.rb', line 20
def grid_x
@grid_x ||= grid_id.split(",")[0]
end
|
#grid_y ⇒ Object
24
25
26
|
# File 'lib/weather_gov/identifier/gridpoint.rb', line 24
def grid_y
@grid_y ||= grid_id.split(",")[1]
end
|
#office_id ⇒ Object
12
13
14
|
# File 'lib/weather_gov/identifier/gridpoint.rb', line 12
def office_id
@office_id ||= id.split("/")[0]
end
|