debian-mirror-gitlab/debian/gems-compat/railties-5.1.7/lib/rails/engine/railties.rb
2019-08-02 22:44:51 +05:30

21 lines
400 B
Ruby

module Rails
class Engine < Railtie
class Railties
include Enumerable
attr_reader :_all
def initialize
@_all ||= ::Rails::Railtie.subclasses.map(&:instance) +
::Rails::Engine.subclasses.map(&:instance)
end
def each(*args, &block)
_all.each(*args, &block)
end
def -(others)
_all - others
end
end
end
end