From cf9a52a7b6a4cb28709f116b306e06395b40b752 Mon Sep 17 00:00:00 2001 From: Xavier Noria Date: Sun, 7 Feb 2010 23:06:15 +0100 Subject: removes Module#as_load_path, which is no longer used --- .../lib/active_support/core_ext/module/loading.rb | 25 ---------------------- 1 file changed, 25 deletions(-) delete mode 100644 activesupport/lib/active_support/core_ext/module/loading.rb (limited to 'activesupport/lib/active_support/core_ext/module') diff --git a/activesupport/lib/active_support/core_ext/module/loading.rb b/activesupport/lib/active_support/core_ext/module/loading.rb deleted file mode 100644 index 43d0578ae6..0000000000 --- a/activesupport/lib/active_support/core_ext/module/loading.rb +++ /dev/null @@ -1,25 +0,0 @@ -require 'active_support/core_ext/string/inflections' - -class Module - # Returns String#underscore applied to the module name minus trailing classes. - # - # ActiveRecord.as_load_path # => "active_record" - # ActiveRecord::Associations.as_load_path # => "active_record/associations" - # ActiveRecord::Base.as_load_path # => "active_record" (Base is a class) - # - # The Kernel module gives an empty string by definition. - # - # Kernel.as_load_path # => "" - # Math.as_load_path # => "math" - def as_load_path - if self == Object || self == Kernel - '' - elsif is_a? Class - parent == self ? '' : parent.as_load_path - else - name.split('::').collect do |word| - word.underscore - end * '/' - end - end -end \ No newline at end of file -- cgit v1.2.3