diff options
author | Norman Clarke <norman@njclarke.com> | 2012-01-05 16:36:21 -0300 |
---|---|---|
committer | Norman Clarke <norman@njclarke.com> | 2012-01-05 16:36:21 -0300 |
commit | c973161c388dbf4e175c59fd8939b794c5f662cb (patch) | |
tree | fd0d8a226c5de5ecebad15efae3e03b7838bdc10 /activesupport/lib/active_support | |
parent | 262af66d0578b748fb878e2b0d36eb40af722efc (diff) | |
download | rails-c973161c388dbf4e175c59fd8939b794c5f662cb.tar.gz rails-c973161c388dbf4e175c59fd8939b794c5f662cb.tar.bz2 rails-c973161c388dbf4e175c59fd8939b794c5f662cb.zip |
Remove unused code.
Diffstat (limited to 'activesupport/lib/active_support')
-rw-r--r-- | activesupport/lib/active_support/multibyte/chars.rb | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/activesupport/lib/active_support/multibyte/chars.rb b/activesupport/lib/active_support/multibyte/chars.rb index ba2ada2c1a..fc0650dbbe 100644 --- a/activesupport/lib/active_support/multibyte/chars.rb +++ b/activesupport/lib/active_support/multibyte/chars.rb @@ -202,31 +202,6 @@ module ActiveSupport #:nodoc: end end - def justify(integer, way, padstr=' ') #:nodoc: - raise ArgumentError, "zero width padding" if padstr.length == 0 - padsize = integer - size - padsize = padsize > 0 ? padsize : 0 - case way - when :right - result = @wrapped_string.dup.insert(0, padding(padsize, padstr)) - when :left - result = @wrapped_string.dup.insert(-1, padding(padsize, padstr)) - when :center - lpad = padding((padsize / 2.0).floor, padstr) - rpad = padding((padsize / 2.0).ceil, padstr) - result = @wrapped_string.dup.insert(0, lpad).insert(-1, rpad) - end - chars(result) - end - - def padding(padsize, padstr=' ') #:nodoc: - if padsize != 0 - chars(padstr * ((padsize / Unicode.u_unpack(padstr).size) + 1)).slice(0, padsize) - else - '' - end - end - def chars(string) #:nodoc: self.class.new(string) end |