Module: MongoMapper::Plugins
- Defined in:
- lib/mongo_mapper/plugins.rb,
lib/mongo_mapper/plugins/keys.rb,
lib/mongo_mapper/plugins/clone.rb,
lib/mongo_mapper/plugins/dirty.rb,
lib/mongo_mapper/plugins/rails.rb,
lib/mongo_mapper/plugins/logger.rb,
lib/mongo_mapper/plugins/inspect.rb,
lib/mongo_mapper/plugins/equality.rb,
lib/mongo_mapper/plugins/callbacks.rb,
lib/mongo_mapper/plugins/protected.rb,
lib/mongo_mapper/plugins/pagination.rb,
lib/mongo_mapper/plugins/descendants.rb,
lib/mongo_mapper/plugins/validations.rb,
lib/mongo_mapper/plugins/associations.rb,
lib/mongo_mapper/plugins/identity_map.rb,
lib/mongo_mapper/plugins/serialization.rb,
lib/mongo_mapper/plugins/associations/base.rb,
lib/mongo_mapper/plugins/associations/proxy.rb,
lib/mongo_mapper/plugins/associations/one_proxy.rb,
lib/mongo_mapper/plugins/associations/collection.rb,
lib/mongo_mapper/plugins/associations/in_array_proxy.rb,
lib/mongo_mapper/plugins/associations/belongs_to_proxy.rb,
lib/mongo_mapper/plugins/associations/embedded_collection.rb,
lib/mongo_mapper/plugins/associations/many_embedded_proxy.rb,
lib/mongo_mapper/plugins/associations/many_documents_proxy.rb,
lib/mongo_mapper/plugins/associations/many_polymorphic_proxy.rb,
lib/mongo_mapper/plugins/associations/many_documents_as_proxy.rb,
lib/mongo_mapper/plugins/associations/belongs_to_polymorphic_proxy.rb,
lib/mongo_mapper/plugins/associations/many_embedded_polymorphic_proxy.rb
Defined Under Namespace
Modules: Associations, Callbacks, Clone, Descendants, Dirty, Equality, IdentityMap, Inspect, Keys, Logger, Pagination, Protected, Rails, Serialization, Validations
Instance Method Summary
collapse
Instance Method Details
#plugin(mod) ⇒ Object
7
8
9
10
11
12
|
# File 'lib/mongo_mapper/plugins.rb', line 7
def plugin(mod)
extend mod::ClassMethods if mod.const_defined?(:ClassMethods)
include mod::InstanceMethods if mod.const_defined?(:InstanceMethods)
mod.configure(self) if mod.respond_to?(:configure)
plugins << mod
end
|
3
4
5
|
# File 'lib/mongo_mapper/plugins.rb', line 3
def plugins
@plugins ||= []
end
|