Sha256: cba8f8077efbe078362ff09fdfef035c088ffccb73e8975fd9ef443124c42f4f
Contents?: true
Size: 502 Bytes
Versions: 8
Compression:
Stored size: 502 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, &block) direct_descendants << base if base super end end end
Version data entries
8 entries across 8 versions & 3 rubygems