Sha256: b9a6d0c6302bb66db753bb3fbec65797b1ee0fbc4d1e5f35ef810465420b1a3d
Contents?: true
Size: 358 Bytes
Versions: 7
Compression:
Stored size: 358 Bytes
Contents
module Toy def models @models ||= Set.new end def plugins @plugins ||= Set.new end def plugin(mod) Toy.models.each { |model| model.send(:include, mod) } plugins << mod end module Plugins extend ActiveSupport::Concern included do Toy.models << self Toy.plugins.each { |mod| include mod } end end end
Version data entries
7 entries across 7 versions & 1 rubygems