Sha256: 7a22deb20889991de623793a437ce4097fb37fc1f9088a195848836ba665531a
Contents?: true
Size: 281 Bytes
Versions: 6
Compression:
Stored size: 281 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
6 entries across 6 versions & 1 rubygems