Sha256: bb13358fe0e126d2545e7fb45fabf552351ed255145145cac6d6d21bc6fe5b96
Contents?: true
Size: 179 Bytes
Versions: 35
Compression:
Stored size: 179 Bytes
Contents
class String def underscore self.gsub(/::/, '/'). gsub(/([A-Z]+)([A-Z][a-z])/,'\1_\2'). gsub(/([a-z\d])([A-Z])/,'\1_\2'). tr("-", "_"). downcase end end
Version data entries
35 entries across 35 versions & 2 rubygems