Sha256: 66292ec5e071cf117e51e99b511ef71405d1ba6605891542e9edc19ce3d3b545

Contents?: true

Size: 484 Bytes

Versions: 65

Compression:

Stored size: 484 Bytes

Contents

# encoding: UTF-8
module MongoMapper
  module Extensions
    module Object
      module ClassMethods
        def to_mongo(value)
          value
        end

        def from_mongo(value)
          value
        end
      end

      module InstanceMethods
        def to_mongo
          self.class.to_mongo(self)
        end
      end
    end
  end
end

class Object
  extend MongoMapper::Extensions::Object::ClassMethods
  include MongoMapper::Extensions::Object::InstanceMethods
end

Version data entries

65 entries across 65 versions & 7 rubygems

Version Path
mongo_mapper-0.10.1 lib/mongo_mapper/extensions/object.rb
mongo_mapper-0.10.0 lib/mongo_mapper/extensions/object.rb
mongo_mapper-0.9.2 lib/mongo_mapper/extensions/object.rb
jonbell-mongo_mapper-0.8.6 lib/mongo_mapper/extensions/object.rb
mongo_mapper-0.9.1 lib/mongo_mapper/extensions/object.rb
mongo_mapper-0.9.0 lib/mongo_mapper/extensions/object.rb
ign-mongo_mapper-0.8.6.2 lib/mongo_mapper/extensions/object.rb
ign-mongo_mapper-0.8.6.1 lib/mongo_mapper/extensions/object.rb
ssherman-mongo_mapper-0.8.6 lib/mongo_mapper/extensions/object.rb
mongo_mapper-0.8.6 lib/mongo_mapper/extensions/object.rb
mongo_mapper-0.8.5 lib/mongo_mapper/extensions/object.rb
honkster-mongo_mapper-0.8.4 lib/mongo_mapper/extensions/object.rb
mongo_mapper-0.8.4 lib/mongo_mapper/extensions/object.rb
mongo_mapper-unstable-2010.08.19 lib/mongo_mapper/extensions/object.rb
mongo_mapper-unstable-2010.08.18 lib/mongo_mapper/extensions/object.rb
mongo_mapper-unstable-2010.08.17 lib/mongo_mapper/extensions/object.rb
mongo_mapper-unstable-2010.08.16 lib/mongo_mapper/extensions/object.rb
mongo_mapper-unstable-2010.08.15 lib/mongo_mapper/extensions/object.rb
mongo_mapper-unstable-2010.08.14 lib/mongo_mapper/extensions/object.rb
mongo_mapper-unstable-2010.08.13 lib/mongo_mapper/extensions/object.rb