Sha256: 708988e034ca3bcef99f73788c2d72ed2371fdf9c2a5bf94f0f6e9967a85b90e

Contents?: true

Size: 217 Bytes

Versions: 91

Compression:

Stored size: 217 Bytes

Contents

class LatLng
  attr_accessor :lat, :lng

  def self.demongoize(object)
    LatLng.new(object[1], object[0])
  end

  def initialize(lat, lng)
    @lat, @lng = lat, lng
  end

  def mongoize
    [ lng, lat ]
  end
end

Version data entries

91 entries across 86 versions & 8 rubygems

Version Path
mongoid-6.0.1 spec/app/models/lat_lng.rb
mongoid-5.1.5 spec/app/models/lat_lng.rb
mongoid-6.0.0 spec/app/models/lat_lng.rb
mongoid-5.1.4 spec/app/models/lat_lng.rb
mongoid-6.0.0.rc0 spec/app/models/lat_lng.rb
mongoid-6.0.0.beta spec/app/models/lat_lng.rb
ish_lib_manager-0.0.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/mongoid-4.0.2/spec/app/models/lat_lng.rb
ish_lib_manager-0.0.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/mongoid-5.1.3/spec/app/models/lat_lng.rb
mongoid-5.1.3 spec/app/models/lat_lng.rb
mongoid-5.1.2 spec/app/models/lat_lng.rb
mongoid-5.1.1 spec/app/models/lat_lng.rb
mongoid-5.1.0 spec/app/models/lat_lng.rb
tdiary-4.2.1 vendor/bundle/ruby/2.3.0/gems/mongoid-5.0.2/spec/app/models/lat_lng.rb
tdiary-4.2.1 vendor/bundle/ruby/2.2.0/gems/mongoid-5.0.1/spec/app/models/lat_lng.rb
tdiary-4.2.1 vendor/bundle/ruby/2.2.0/gems/mongoid-5.0.2/spec/app/models/lat_lng.rb
mongoid-5.0.2 spec/app/models/lat_lng.rb
mongoid-5.0.1 spec/app/models/lat_lng.rb
mongoid-paranoia-1.1.0 spec/app/models/lat_lng.rb
mongoid-5.0.0 spec/app/models/lat_lng.rb
mongoid-5.0.0.rc0 spec/app/models/lat_lng.rb