Sha256: c90407275f15f0214fcde8ebd3735b8b7b820463f53483a70459c6894804f3bc
Contents?: true
Size: 260 Bytes
Versions: 1
Compression:
Stored size: 260 Bytes
Contents
module Pimento class Util def self.underscore(camel_cased_word) camel_cased_word.to_s.gsub(/::/, '/'). gsub(/([A-Z]+)([A-Z][a-z])/,'\1_\2'). gsub(/([a-z\d])([A-Z])/,'\1_\2'). tr("-", "_"). downcase end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
pimento-0.0.2 | lib/pimento/util.rb |