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
mongo_mapper-unstable-2010.07.13 lib/mongo_mapper/plugins.rb
mongo_mapper-unstable-2010.07.12 lib/mongo_mapper/plugins.rb
mongo_mapper-unstable-2010.07.09 lib/mongo_mapper/plugins.rb
mongo_mapper-unstable-2010.07.08 lib/mongo_mapper/plugins.rb
mongo_mapper-unstable-2010.07.07 lib/mongo_mapper/plugins.rb
mongo_mapper-unstable-2010.07.06 lib/mongo_mapper/plugins.rb
mongo_mapper-unstable-2010.07.05 lib/mongo_mapper/plugins.rb
mongo_mapper-unstable-2010.07.02 lib/mongo_mapper/plugins.rb
mongo_mapper-unstable-2010.07.01 lib/mongo_mapper/plugins.rb
mongo_mapper-unstable-2010.06.30 lib/mongo_mapper/plugins.rb
mongo_mapper-unstable-2010.06.29 lib/mongo_mapper/plugins.rb
mongo_mapper-unstable-2010.06.28 lib/mongo_mapper/plugins.rb
mongo_mapper-unstable-2010.06.25 lib/mongo_mapper/plugins.rb
mongo_mapper-unstable-2010.06.24 lib/mongo_mapper/plugins.rb
mongo_mapper-unstable-2010.06.23 lib/mongo_mapper/plugins.rb
mongo_mapper-0.8.2 lib/mongo_mapper/plugins.rb
mongo_mapper-0.8.1 lib/mongo_mapper/plugins.rb
mongo_mapper-0.8.0 lib/mongo_mapper/plugins.rb