Sha256: bf035abb7aa979466ceb8a6bab0cc8c5a99aba552fac5a53a3251c96c729d00d
Contents?: true
Size: 217 Bytes
Versions: 6
Compression:
Stored size: 217 Bytes
Contents
class String # Converts a snake_case string to CamelCase # # @return [String] def camelize self.gsub(/\/(.?)/){"::#{$1.upcase}"}.gsub(/(?:^|_)(.)/){$1.upcase} end unless method_defined?(:camelize) end
Version data entries
6 entries across 6 versions & 1 rubygems