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

22 lines
446 B
Ruby
Raw Normal View History

2010-06-23 10:10:26 -04:00
require 'rails/engine/railties'
2010-01-23 10:59:32 -05:00
2010-06-23 10:10:26 -04:00
module Rails
class Application < Engine
class Railties < Rails::Engine::Railties
2010-01-23 10:59:32 -05:00
def all(&block)
2010-06-23 10:10:26 -04:00
@all ||= railties + engines + super
2010-01-23 10:59:32 -05:00
@all.each(&block) if block
@all
end
def railties
@railties ||= ::Rails::Railtie.subclasses.map(&:new)
end
def engines
@engines ||= ::Rails::Engine.subclasses.map(&:instance)
2010-01-23 10:59:32 -05:00
end
end
end
end