Sha256: 344826e423c28157e2e29d6949d0f4313b03f822bc808f3a425ab85367960473

Contents?: true

Size: 388 Bytes

Versions: 2

Compression:

Stored size: 388 Bytes

Contents

module NCMB
  class GeoPoint
    include NCMB
    
    def initialize(latitude, longitude)
      @latitude = latitude
      @longitude = longitude
    end
    
    def to_json(a = "")
      "{\"__type\": \"GeoPoint\", \"longitude\": #{@longitude}, \"latitude\": #{@latitude}}"
    end
    
    def to_s
      "GeoPoint (latitude: #{@latitude}, longitude: #{@longitude})"
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ncmb-ruby-client-0.0.9 lib/ncmb/geo_point.rb
ncmb-ruby-client-0.0.8 lib/ncmb/geo_point.rb