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

Version Path
mongo_mapper-unstable-2010.2.28 lib/mongo_mapper/plugins.rb
mongo_mapper-unstable-2010.2.27 lib/mongo_mapper/plugins.rb
mongo_mapper-unstable-2010.2.26 lib/mongo_mapper/plugins.rb
mongo_mapper-unstable-2010.2.25 lib/mongo_mapper/plugins.rb
mongo_mapper-unstable-2010.2.24 lib/mongo_mapper/plugins.rb
mongo_mapper-unstable-2010.2.23 lib/mongo_mapper/plugins.rb
mongo_mapper-unstable-2010.2.22 lib/mongo_mapper/plugins.rb
mongo_mapper-unstable-2010.2.19 lib/mongo_mapper/plugins.rb
mongo_mapper-unstable-2010.2.18 lib/mongo_mapper/plugins.rb
mongo_mapper-unstable-2010.2.17 lib/mongo_mapper/plugins.rb
mongo_mapper-unstable-2010.2.16 lib/mongo_mapper/plugins.rb
mongo_mapper-unstable-2010.2.15 lib/mongo_mapper/plugins.rb
mongo_mapper-unstable-2010.2.12 lib/mongo_mapper/plugins.rb
mongo_mapper-unstable-2010.2.11 lib/mongo_mapper/plugins.rb
mongo_mapper-unstable-2010.2.10 lib/mongo_mapper/plugins.rb
mongo_mapper-0.7.0 lib/mongo_mapper/plugins.rb