lib/firstfm/location.rb in firstfm-0.7.0 vs lib/firstfm/location.rb in firstfm-0.8.0

- old
+ new

@@ -1,22 +1,22 @@ module Firstfm - + class Location - + attr_accessor :city, :country, :postalcode, :lat, :long, :street - + def self.init_location_from_hash(hash) return nil unless hash.is_a?(Hash) - + location = Location.new location.city = hash["city"] location.country = hash["country"] location.postalcode = hash["postalcode"] location.street = hash["street"] - location.lat = hash["point"]["lat"] if hash["point"] - location.long = hash["point"]["long"] if hash["point"] + location.lat = hash["geo:point"]["geo:lat"] if hash["geo:point"] + location.long = hash["geo:point"]["geo:long"] if hash["geo:point"] location end - + end - + end \ No newline at end of file