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.08.06 lib/mongo_mapper/plugins.rb
mongo_mapper-unstable-2010.08.05 lib/mongo_mapper/plugins.rb
mongo_mapper-unstable-2010.08.04 lib/mongo_mapper/plugins.rb
mongo_mapper-unstable-2010.08.03 lib/mongo_mapper/plugins.rb
mongo_mapper-unstable-2010.08.02 lib/mongo_mapper/plugins.rb
mongo_mapper-unstable-2010.08.01 lib/mongo_mapper/plugins.rb
mongo_mapper-unstable-2010.07.31 lib/mongo_mapper/plugins.rb
mongo_mapper-unstable-2010.07.30 lib/mongo_mapper/plugins.rb
mongo_mapper-unstable-2010.07.29 lib/mongo_mapper/plugins.rb
mongo_mapper-unstable-2010.07.28 lib/mongo_mapper/plugins.rb
mongo_mapper-unstable-2010.07.27 lib/mongo_mapper/plugins.rb
mongo_mapper-unstable-2010.07.26 lib/mongo_mapper/plugins.rb
mongo_mapper-unstable-2010.07.23 lib/mongo_mapper/plugins.rb
mongo_mapper-unstable-2010.07.21 lib/mongo_mapper/plugins.rb
mongo_mapper-unstable-2010.07.20 lib/mongo_mapper/plugins.rb
mongo_mapper-unstable-2010.07.19 lib/mongo_mapper/plugins.rb
mongo_mapper-unstable-2010.07.18 lib/mongo_mapper/plugins.rb
mongo_mapper-unstable-2010.07.16 lib/mongo_mapper/plugins.rb
mongo_mapper-unstable-2010.07.15 lib/mongo_mapper/plugins.rb
mongo_mapper-unstable-2010.07.14 lib/mongo_mapper/plugins.rb