Sha256: 2916fd59818a45d97f88fbd902f27bb5591ea3f75beffa078541327a3cbb3b17

Contents?: true

Size: 446 Bytes

Versions: 1

Compression:

Stored size: 446 Bytes

Contents

# encoding: UTF-8
module MongoMapper
  module Plugins
    def plugins
      @plugins ||= []
    end

    def plugin(mod)
      #extend mod::ClassMethods     if mod.const_defined?(:ClassMethods)
      extend mod::ClassMethods if mod.constants.include?(: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

1 entries across 1 versions & 1 rubygems

Version Path
thorsson-mongo_mapper-0.8.2 lib/mongo_mapper/plugins.rb