Sha256: 3b1ca7d71cd82be06568c0600c531a88d12d1dea4045ae44807cb2adb56533ff
Contents?: true
Size: 461 Bytes
Versions: 15
Compression:
Stored size: 461 Bytes
Contents
module DataMapper class Property class ParseGeoPoint < Object def dump(value) value && {"__type" => "GeoPoint", "latitude" => value["lat"].to_f, "longitude" => value["lng"].to_f} end def load(value) value && {"lat" => value["latitude"], "lng" => value["longitude"]} end def valid?(value) return false if value && (value["lat"].nil? || value["lng"].nil?) super end end end end
Version data entries
15 entries across 15 versions & 1 rubygems