Module: MongoMapper::Plugins

Defined in:
lib/mongo_mapper.rb,
lib/mongo_mapper/plugins.rb,
lib/mongo_mapper/plugins/sci.rb,
lib/mongo_mapper/plugins/keys.rb,
lib/mongo_mapper/plugins/safe.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/scopes.rb,
lib/mongo_mapper/plugins/caching.rb,
lib/mongo_mapper/plugins/indexes.rb,
lib/mongo_mapper/plugins/inspect.rb,
lib/mongo_mapper/plugins/document.rb,
lib/mongo_mapper/plugins/equality.rb,
lib/mongo_mapper/plugins/keys/key.rb,
lib/mongo_mapper/plugins/querying.rb,
lib/mongo_mapper/plugins/callbacks.rb,
lib/mongo_mapper/plugins/modifiers.rb,
lib/mongo_mapper/plugins/protected.rb,
lib/mongo_mapper/plugins/accessible.rb,
lib/mongo_mapper/plugins/pagination.rb,
lib/mongo_mapper/plugins/timestamps.rb,
lib/mongo_mapper/plugins/userstamps.rb,
lib/mongo_mapper/plugins/descendants.rb,
lib/mongo_mapper/plugins/persistence.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/dynamic_querying.rb,
lib/mongo_mapper/plugins/associations/base.rb,
lib/mongo_mapper/plugins/embedded_document.rb,
lib/mongo_mapper/plugins/associations/proxy.rb,
lib/mongo_mapper/plugins/querying/decorator.rb,
lib/mongo_mapper/plugins/associations/one_proxy.rb,
lib/mongo_mapper/plugins/associations/collection.rb,
lib/mongo_mapper/plugins/querying/plucky_methods.rb,
lib/mongo_mapper/plugins/associations/in_array_proxy.rb,
lib/mongo_mapper/plugins/associations/belongs_to_proxy.rb,
lib/mongo_mapper/plugins/associations/one_embedded_proxy.rb,
lib/mongo_mapper/plugins/dynamic_querying/dynamic_finder.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: Accessible, Associations, Caching, Callbacks, Clone, Descendants, Dirty, Document, DynamicQuerying, EmbeddedDocument, Equality, IdentityMap, Indexes, Inspect, Keys, Logger, Modifiers, Pagination, Persistence, Protected, Querying, Rails, Safe, Sci, Scopes, Serialization, Timestamps, Userstamps, Validations

Instance Method Summary collapse

Instance Method Details

#plugin(mod) ⇒ Object



8
9
10
11
12
13
# File 'lib/mongo_mapper/plugins.rb', line 8

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

#pluginsObject



4
5
6
# File 'lib/mongo_mapper/plugins.rb', line 4

def plugins
  @plugins ||= []
end