Class: WeatherGov::Identifier::Point

Inherits:
WeatherGov::Identifier show all
Defined in:
lib/weather_gov/identifier/point.rb

Constant Summary

Constants inherited from WeatherGov::Identifier

TYPES

Instance Attribute Summary

Attributes inherited from WeatherGov::Identifier

#uri

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from WeatherGov::Identifier

#id, #initialize, parse, #to_s

Constructor Details

This class inherits a constructor from WeatherGov::Identifier

Class Method Details

.base_uriObject



8
9
10
# File 'lib/weather_gov/identifier/point.rb', line 8

def self.base_uri
  URI.join(super, "/points/").to_s
end

Instance Method Details

#latObject



12
13
14
# File 'lib/weather_gov/identifier/point.rb', line 12

def lat
  @lat ||= id.split(",")[0]
end

#lonObject



16
17
18
# File 'lib/weather_gov/identifier/point.rb', line 16

def lon
  @lon ||= id.split(",")[1]
end