Sha256: 57286a39a1237ddf3da657ef7a60a6d79d06771fc6280f30de4743f83a99de7f

Contents?: true

Size: 503 Bytes

Versions: 1

Compression:

Stored size: 503 Bytes

Contents

module DataMapper
  module Mongo
    # Used in preference over DataMapper::Resource to add MongoDB-specific
    # functionality to models.
    module Resource
      def self.included(model)
        model.send(:include, DataMapper::Resource)
        model.send(:include, Modifier)

        # Needs to be after the inclusion of DM::Resource so as to overwrite
        # methods added by DM::Model.
        model.extend(Model)
      end # ResourceMethods

    end # Resource
  end # Mongo
end # DataMapper

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
dm-mongo-adapter-0.6.0 lib/mongo_adapter/resource.rb