Sha256: 0a2b6e881b40aa516e44c46b3b1217ce79cf1c7f5823ca548bb10fde2e81740e
Contents?: true
Size: 494 Bytes
Versions: 12
Compression:
Stored size: 494 Bytes
Contents
# encoding: UTF-8 module MongoMapper module Plugins include ActiveSupport::DescendantsTracker def plugins @plugins ||= [] end def plugin(mod) raise ArgumentError, "Plugins must extend ActiveSupport::Concern" unless ActiveSupport::Concern === mod include mod direct_descendants.each {|model| model.send(:include, mod) } plugins << mod end def included(base = nil) direct_descendants << base if base super end end end
Version data entries
12 entries across 12 versions & 1 rubygems