mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
c56a4a4f51
Related with commit 4a2a504
21 lines
400 B
Ruby
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
|