Sha256: 6b8214eedc0bcb068720e2d58448abfa17a4ba342004866e9d00549319451efe

Contents?: true

Size: 275 Bytes

Versions: 4

Compression:

Stored size: 275 Bytes

Contents

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

      def point
        Point.new(self[0])
      end
      alias_method :point, :center

      def radius
        self[1]
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
mongoid-geospatial-5.0.0 lib/mongoid/geospatial/fields/circle.rb
mongoid-geospatial-4.0.1 lib/mongoid/geospatial/fields/circle.rb
mongoid-geospatial-4.0.0 lib/mongoid/geospatial/fields/circle.rb
mongoid-geospatial-3.9.0 lib/mongoid/geospatial/fields/circle.rb