lib/mongoid/geospatial/fields/point.rb in mongoid-geospatial-3.9.0 vs lib/mongoid/geospatial/fields/point.rb in mongoid-geospatial-4.0.0
- old
+ new
@@ -4,11 +4,10 @@
#
class Point
include Enumerable
attr_reader :x, :y
- def initialize(x = nil, y = nil)
- return unless x && y
+ def initialize(x, y)
@x, @y = x, y
end
# Object -> Database
# Let's store NilClass if we are invalid.