Sha256: 5fa9b25ba3833f82d710d1d46c4248ada34daa608ba932b781d7e8e0b22de8f1
Contents?: true
Size: 283 Bytes
Versions: 20
Compression:
Stored size: 283 Bytes
Contents
# From active-support/inflector.rb class String def camelize(first_letter_in_uppercase = true) s = self if first_letter_in_uppercase s.gsub(/\/(.?)/) { "::" + $1.upcase }.gsub(/(^|_)(.)/) { $2.upcase } else s[0..0] + s.camelize[1..-1] end end end
Version data entries
20 entries across 20 versions & 2 rubygems