Sha256: c2813b9566ad2522b84e7d355113bbf2f1b4076b78197ff97cd9de77a642ee35
Contents?: true
Size: 1.22 KB
Versions: 16
Compression:
Stored size: 1.22 KB
Contents
module MongoMapper module Plugins def plugins @plugins ||= [] end 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 autoload :Callbacks, 'mongo_mapper/plugins/callbacks' autoload :Clone, 'mongo_mapper/plugins/clone' autoload :Descendants, 'mongo_mapper/plugins/descendants' autoload :Dirty, 'mongo_mapper/plugins/dirty' autoload :Equality, 'mongo_mapper/plugins/equality' autoload :IdentityMap, 'mongo_mapper/plugins/identity_map' autoload :Inspect, 'mongo_mapper/plugins/inspect' autoload :Keys, 'mongo_mapper/plugins/keys' autoload :Logger, 'mongo_mapper/plugins/logger' autoload :Protected, 'mongo_mapper/plugins/protected' autoload :Rails, 'mongo_mapper/plugins/rails' autoload :Serialization, 'mongo_mapper/plugins/serialization' autoload :Validations, 'mongo_mapper/plugins/validations' end end require 'mongo_mapper/plugins/associations' require 'mongo_mapper/plugins/pagination'
Version data entries
16 entries across 16 versions & 2 rubygems