Sha256: 9ffba3047fb6f7af31df7a702123db01fad4f778e54bc1f1952644d918edb0e1
Contents?: true
Size: 178 Bytes
Versions: 22
Compression:
Stored size: 178 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
22 entries across 22 versions & 2 rubygems