aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support.rb
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2009-05-20 17:11:41 -0700
committerJeremy Kemper <jeremy@bitsweat.net>2009-05-20 18:12:44 -0700
commit5f222c524ed00b2ac805e267f70a916cf8f9bc77 (patch)
tree1689d5d964cccc5a902449dd9de86705f831a5d8 /activesupport/lib/active_support.rb
parent3694227f24d0f220c0ce7ef6c7f51598e2715d2d (diff)
downloadrails-5f222c524ed00b2ac805e267f70a916cf8f9bc77.tar.gz
rails-5f222c524ed00b2ac805e267f70a916cf8f9bc77.tar.bz2
rails-5f222c524ed00b2ac805e267f70a916cf8f9bc77.zip
Remove 'core' fluff. Hookable ActiveSupport.load_all!
Diffstat (limited to 'activesupport/lib/active_support.rb')
-rw-r--r--activesupport/lib/active_support.rb11
1 files changed, 9 insertions, 2 deletions
diff --git a/activesupport/lib/active_support.rb b/activesupport/lib/active_support.rb
index dab017770d..a1a140bc33 100644
--- a/activesupport/lib/active_support.rb
+++ b/activesupport/lib/active_support.rb
@@ -22,8 +22,15 @@
#++
module ActiveSupport
- def self.load_all!
- [Dependencies, Deprecation, Gzip, MessageVerifier, Multibyte, SecureRandom] + Core.load_all!
+ class << self
+ attr_accessor :load_all_hooks
+ def on_load_all(&hook) load_all_hooks << hook end
+ def load_all!; load_all_hooks.each { |hook| hook.call } end
+ end
+ self.load_all_hooks = []
+
+ on_load_all do
+ [Dependencies, Deprecation, Gzip, MessageVerifier, Multibyte, SecureRandom]
end
autoload :BacktraceCleaner, 'active_support/backtrace_cleaner'