lib/ncmb/geo_point.rb in ncmb-ruby-client-0.1.3 vs lib/ncmb/geo_point.rb in ncmb-ruby-client-0.1.4
- old
+ new
@@ -1,18 +1,20 @@
+# frozen_string_literal: true
+
module NCMB
class GeoPoint
include NCMB
def initialize(latitude, longitude)
@latitude = latitude
@longitude = longitude
end
- def to_json(a = "")
+ def to_json(a = '')
{
- "__type": "GeoPoint",
- "longitude": @longitude,
- "latitude": @latitude
+ '__type': 'GeoPoint',
+ 'longitude': @longitude,
+ 'latitude': @latitude
}.to_json
end
def to_s
"GeoPoint (latitude: #{@latitude}, longitude: #{@longitude})"
\ No newline at end of file