Sha256: 40a2d1e857c54022b4fc5f6c8ac4556d0c28dfc7eaebbd462ba93437b5ce05b3
Contents?: true
Size: 190 Bytes
Versions: 8
Compression:
Stored size: 190 Bytes
Contents
class String def underscore self.to_s.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
8 entries across 8 versions & 1 rubygems