Module: DataMapper::Mongo::Resource

Defined in:
lib/dm-mongo-adapter/resource.rb

Overview

Used in preference over DataMapper::Resource to add MongoDB-specific functionality to models.

Class Method Summary collapse

Class Method Details

.included(model) ⇒ Object


6
7
8
9
10
11
12
13
# File 'lib/dm-mongo-adapter/resource.rb', line 6

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