diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2005-09-03 07:11:47 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2005-09-03 07:11:47 +0000 |
commit | 1e145099a78688d25f2cfcafe58afbd651bf7be4 (patch) | |
tree | 287ad1369fc08c1f8d17cb537b8be6a23fba5906 /activesupport/lib/active_support/core_ext/string.rb | |
parent | 89550ee7e90fa824c99cf4882426d9a5269d0d64 (diff) | |
download | rails-1e145099a78688d25f2cfcafe58afbd651bf7be4.tar.gz rails-1e145099a78688d25f2cfcafe58afbd651bf7be4.tar.bz2 rails-1e145099a78688d25f2cfcafe58afbd651bf7be4.zip |
Added String#at, String#from, String#to, String#first, String#last in ActiveSupport::CoreExtensions::String::Access to ease access to individual characters and substrings in a string serving basically as human names for range access. Added easy extendability to the inflector through Inflector.inflections (using the Inflector::Inflections singleton class)
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2110 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activesupport/lib/active_support/core_ext/string.rb')
-rw-r--r-- | activesupport/lib/active_support/core_ext/string.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/core_ext/string.rb b/activesupport/lib/active_support/core_ext/string.rb index 3056f74744..fce0557c64 100644 --- a/activesupport/lib/active_support/core_ext/string.rb +++ b/activesupport/lib/active_support/core_ext/string.rb @@ -1,7 +1,9 @@ require File.dirname(__FILE__) + '/string/inflections' require File.dirname(__FILE__) + '/string/conversions' +require File.dirname(__FILE__) + '/string/access' class String #:nodoc: - include ActiveSupport::CoreExtensions::String::Inflections + include ActiveSupport::CoreExtensions::String::Access include ActiveSupport::CoreExtensions::String::Conversions + include ActiveSupport::CoreExtensions::String::Inflections end |