Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

21 lines (19 sloc) 0.531 kb
# encoding: UTF-8
module MongoMapper
module Plugins
def plugins
@plugins ||= []
end
def plugin(mod)
if ActiveSupport::Concern === mod
include mod
else
warn "[DEPRECATED] Plugins must extend ActiveSupport::Concern"
extend mod::ClassMethods if mod.const_defined?(:ClassMethods)
include mod::InstanceMethods if mod.const_defined?(:InstanceMethods)
mod.configure(self) if mod.respond_to?(:configure)
end
plugins << mod
end
end
end
Jump to Line
Something went wrong with that request. Please try again.