Sha256: baa99033f4447d2f5934b0963478dac41a4e06b4953a0c18608f6a74c4e096fe
Contents?: true
Size: 260 Bytes
Versions: 2
Compression:
Stored size: 260 Bytes
Contents
String.class_eval do def camelize r = self.split(/\W|_/).map do |e| e[0] = e[0].upcase e end r.join end def uncamelize self.split(/(?=[A-Z])/).join("_").downcase end def implicit self.split("").join(".*") end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
ro_commands-0.0.3 | lib/ro_commands/core_ext/string.rb |
ro_commands-0.0.2 | lib/ro_commands/core_ext/string.rb |