2009-11-06 20:21:39 -05:00
|
|
|
require "rails" # In case people require this file directly
|
2009-06-19 14:27:24 -04:00
|
|
|
|
2005-09-03 11:13:06 -04:00
|
|
|
module Rails
|
|
|
|
class Initializer
|
2009-06-18 20:44:35 -04:00
|
|
|
class Error < StandardError ; end
|
|
|
|
def self.run(initializer = nil, config = nil)
|
2009-09-29 20:33:17 -04:00
|
|
|
if initializer
|
2009-10-08 21:12:28 -04:00
|
|
|
# Deprecated
|
2009-09-29 20:33:17 -04:00
|
|
|
else
|
|
|
|
Rails.application = Class.new(Application)
|
2009-10-08 18:30:17 -04:00
|
|
|
yield Rails.application.config if block_given?
|
2005-09-13 05:58:16 -04:00
|
|
|
end
|
2005-09-03 11:13:06 -04:00
|
|
|
end
|
2009-07-08 06:19:17 -04:00
|
|
|
end
|
2009-11-23 19:10:43 -05:00
|
|
|
end
|