Sha256: a78dd04612b43ad2185f6cc3f12782c9ef5e3b8451ffd48b9a968f1d25a0b8ce
Contents?: true
Size: 154 Bytes
Versions: 1
Compression:
Stored size: 154 Bytes
Contents
class String def underscore 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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
api_pack-1.3.1 | lib/api_pack/support/undescore.rb |