1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/activesupport/lib/active_support/dependency_module.rb

17 lines
368 B
Ruby

module ActiveSupport
module DependencyModule
def append_features(base)
return false if base < self
(@_dependencies ||= []).each { |dep| base.send(:include, dep) }
super
end
def depends_on(*mods)
mods.each do |mod|
next if self < mod
@_dependencies ||= []
@_dependencies << mod
end
end
end
end