Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Tag: v3.1.0.rc1
Fetching contributors…

Cannot retrieve contributors at this time

34 lines (28 sloc) 0.79 kB
module Rails
class Engine < Railtie
class Railties
# TODO Write tests for this behavior extracted from Application
def initialize(config)
@config = config
end
def all(&block)
@all ||= plugins
@all.each(&block) if block
@all
end
def plugins
@plugins ||= begin
plugin_names = (@config.plugins || [:all]).map { |p| p.to_sym }
Plugin.all(plugin_names, @config.paths["vendor/plugins"].existent)
end
end
def self.railties
@railties ||= ::Rails::Railtie.subclasses.map(&:instance)
end
def self.engines
@engines ||= ::Rails::Engine.subclasses.map(&:instance)
end
delegate :railties, :engines, :to => "self.class"
end
end
end
Jump to Line
Something went wrong with that request. Please try again.