Sha256: 3b7c20a7c00474cfd989383f999326460d1080cba8fef46fcb2f6985e9bf8805
Contents?: true
Size: 182 Bytes
Versions: 4
Compression:
Stored size: 182 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
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
imzml-0.1.4 | lib/core_ext/string.rb |
imzml-0.1.1 | lib/core_ext/string.rb |
imzml-0.1.0 | lib/core_ext/string.rb |
imzml-0.0.2 | lib/core_ext/string.rb |