mongoid/mongoid-geospatial

View on GitHub
lib/mongoid/geospatial/fields/circle.rb

Summary

Maintainability
A
0 mins
Test Coverage
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