Sha256: c8e01278ff846e7169e38f027f69c63b59304a64b718932c752d5565d3e783bf
Contents?: true
Size: 184 Bytes
Versions: 8
Compression:
Stored size: 184 Bytes
Contents
module XmlHasher module Util def self.snakecase(str) str.to_s.gsub(/([A-Z]+)([A-Z][a-z])/, '\1_\2').gsub(/([a-z])([A-Z])/, '\1_\2').downcase.tr('-', '_') end end end
Version data entries
8 entries across 8 versions & 2 rubygems