Sha256: ac2ee4eb19fb9fd280225125430158427e895c97943f44138702a31946ce28c4
Contents?: true
Size: 381 Bytes
Versions: 2
Compression:
Stored size: 381 Bytes
Contents
# encoding: UTF-8 module MongoMapper module Plugins def plugins @plugins ||= [] end def plugin(mod) extend mod::ClassMethods if mod.constants.include?(:ClassMethods) include mod::InstanceMethods if mod.constants.include?(:InstanceMethods) mod.configure(self) if mod.respond_to?(:configure) plugins << mod end end end
Version data entries
2 entries across 2 versions & 2 rubygems
Version | Path |
---|---|
jonbell-mongo_mapper-0.8.6 | lib/mongo_mapper/plugins.rb |
ssherman-mongo_mapper-0.8.6 | lib/mongo_mapper/plugins.rb |