Sha256: c6a47c7e953562e4b4fa9fd47a0a2b9d74bc2782cf65ea5949dcff96bd54c201

Contents?: true

Size: 373 Bytes

Versions: 58

Compression:

Stored size: 373 Bytes

Contents

# encoding: UTF-8
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
  end
end

Version data entries

58 entries across 58 versions & 5 rubygems

Version Path
ign-mongo_mapper-0.8.6.2 lib/mongo_mapper/plugins.rb
ign-mongo_mapper-0.8.6.1 lib/mongo_mapper/plugins.rb
ssherman-mongo_mapper-0.8.6 lib/mongo_mapper/plugins.rb~
mongo_mapper-0.8.6 lib/mongo_mapper/plugins.rb
mongo_mapper-0.8.5 lib/mongo_mapper/plugins.rb
honkster-mongo_mapper-0.8.4 lib/mongo_mapper/plugins.rb
mongo_mapper-0.8.4 lib/mongo_mapper/plugins.rb
mongo_mapper-unstable-2010.08.19 lib/mongo_mapper/plugins.rb
mongo_mapper-unstable-2010.08.18 lib/mongo_mapper/plugins.rb
mongo_mapper-unstable-2010.08.17 lib/mongo_mapper/plugins.rb
mongo_mapper-unstable-2010.08.16 lib/mongo_mapper/plugins.rb
mongo_mapper-unstable-2010.08.15 lib/mongo_mapper/plugins.rb
mongo_mapper-unstable-2010.08.14 lib/mongo_mapper/plugins.rb
mongo_mapper-unstable-2010.08.13 lib/mongo_mapper/plugins.rb
mongo_mapper-unstable-2010.08.12 lib/mongo_mapper/plugins.rb
mongo_mapper-unstable-2010.08.11 lib/mongo_mapper/plugins.rb
mongo_mapper-unstable-2010.08.10 lib/mongo_mapper/plugins.rb
mongo_mapper-unstable-2010.08.09 lib/mongo_mapper/plugins.rb
mongo_mapper-0.8.3 lib/mongo_mapper/plugins.rb
mongo_mapper-unstable-2010.08.08 lib/mongo_mapper/plugins.rb