Sha256: aa59a7eaed90adc7149c86f1d852262998177fdb47bfe8a0dcec2af26d878132

Contents?: true

Size: 267 Bytes

Versions: 1

Compression:

Stored size: 267 Bytes

Contents

module Mongoid
  module Geospatial
    # Circle
    #
    class Circle < GeometryField
      attr_accessor :center, :radius

      def center
        Point.new(*self[0])
      end
      alias point center

      def radius
        self[1]
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
mongoid-geospatial-5.1.0 lib/mongoid/geospatial/fields/circle.rb