Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

33 lines (26 sloc) 0.514 kB
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
Jump to Line
Something went wrong with that request. Please try again.