class Sunweather::Geo
Attributes
data[R]
Public Class Methods
new(request = ENV["FREEFORM_ADDRESS_QUERY"])
click to toggle source
# File lib/sunweather/geo.rb, line 7 def initialize (request = ENV["FREEFORM_ADDRESS_QUERY"]) @data = Geocoder.search(request) end
Public Instance Methods
lat()
click to toggle source
# File lib/sunweather/geo.rb, line 11 def lat @data[0].data["geometry"]["location"]["lat"] end
lng()
click to toggle source
# File lib/sunweather/geo.rb, line 15 def lng @data[0].data["geometry"]["location"]["lng"] end