diff options
author | Joshua Peek <josh@joshpeek.com> | 2009-05-07 10:29:22 -0500 |
---|---|---|
committer | Joshua Peek <josh@joshpeek.com> | 2009-05-07 10:29:22 -0500 |
commit | 2854535b02bcee3668bda02c76c3105fc24730d3 (patch) | |
tree | b78660942bdc6f532a1109da57ee40d7d31cf603 /activesupport/lib/active_support/core_ext/module/setup.rb | |
parent | 783deae99a4850f597135146b19e7ee4622da94e (diff) | |
download | rails-2854535b02bcee3668bda02c76c3105fc24730d3.tar.gz rails-2854535b02bcee3668bda02c76c3105fc24730d3.tar.bz2 rails-2854535b02bcee3668bda02c76c3105fc24730d3.zip |
Make module dependency DSL opt in
Diffstat (limited to 'activesupport/lib/active_support/core_ext/module/setup.rb')
-rw-r--r-- | activesupport/lib/active_support/core_ext/module/setup.rb | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/activesupport/lib/active_support/core_ext/module/setup.rb b/activesupport/lib/active_support/core_ext/module/setup.rb deleted file mode 100644 index e6dfd0cf56..0000000000 --- a/activesupport/lib/active_support/core_ext/module/setup.rb +++ /dev/null @@ -1,26 +0,0 @@ -class Module - attr_accessor :_setup_block - attr_accessor :_dependencies - - def setup(&blk) - @_setup_block = blk - end - - def use(mod) - return if self < mod - - (mod._dependencies || []).each do |dep| - use dep - end - # raise "Circular dependencies" if self < mod - include mod - extend mod.const_get("ClassMethods") if mod.const_defined?("ClassMethods") - class_eval(&mod._setup_block) if mod._setup_block - end - - def depends_on(mod) - return if self < mod - @_dependencies ||= [] - @_dependencies << mod - end -end
\ No newline at end of file |