Sha256: 636967bce3863779d811e7bcd09d24437b52b36169c858ad457cb82d2d3756dd
Contents?: true
Size: 514 Bytes
Versions: 14
Compression:
Stored size: 514 Bytes
Contents
module Toy def models Toy::Store.direct_descendants end def plugins Toy::Store.plugins end def plugin(mod) Toy::Store.plugin(mod) end module Plugins include ActiveSupport::DescendantsTracker def plugins @plugins ||= [] end def plugin(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
14 entries across 14 versions & 1 rubygems