Sha256: b5a9dd3a9182dd15230d4f34f3cd38e546748a1550f68112d414467e4787d4b7

Contents?: true

Size: 358 Bytes

Versions: 13

Compression:

Stored size: 358 Bytes

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
  end
end

Version data entries

13 entries across 13 versions & 2 rubygems

Version Path
novelys_mongo_mapper-0.6.12 lib/novelys_mongo_mapper/plugins.rb
novelys_mongo_mapper-0.6.11 lib/novelys_mongo_mapper/plugins.rb
mongo_mapper-unstable-2010.2.3 lib/mongo_mapper/plugins.rb
novelys_mongo_mapper-0.6.10 lib/mongo_mapper/plugins.rb
mongo_mapper-unstable-2010.2.2 lib/mongo_mapper/plugins.rb
mongo_mapper-unstable-2010.2.1 lib/mongo_mapper/plugins.rb
mongo_mapper-unstable-2010.1.31 lib/mongo_mapper/plugins.rb
mongo_mapper-unstable-2010.1.30 lib/mongo_mapper/plugins.rb
mongo_mapper-unstable-2010.1.29 lib/mongo_mapper/plugins.rb
mongo_mapper-unstable-2010.1.28 lib/mongo_mapper/plugins.rb
mongo_mapper-unstable-2010.1.27 lib/mongo_mapper/plugins.rb
mongo_mapper-unstable-2010.1.26 lib/mongo_mapper/plugins.rb
mongo_mapper-unstable-2010.1.25 lib/mongo_mapper/plugins.rb