Sha256: c55f301ba67a8284f7465ca09c51d02468b60fe4def3fd6e662a40144abc9187
Contents?: true
Size: 196 Bytes
Versions: 2
Compression:
Stored size: 196 Bytes
Contents
module Rhino def self.to_underscore(string) string.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
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
rhino-framework-0.1.1 | lib/rhino/util.rb |
rhino-framework-0.0.4 | lib/rhino/util.rb |