Sha256: 58032a202bb9223fc192ac33f27f78fdc39db35713ffde6b53dabaf1c082822e
Contents?: true
Size: 304 Bytes
Versions: 2
Compression:
Stored size: 304 Bytes
Contents
module Htcht module Helpers module NameHelpers def snake_casify(name) name.gsub(/::/, '/'). gsub(/([A-Z]+)([A-Z][a-z])/,'\1_\2'). gsub(/([a-z\d])([A-Z])/,'\1_\2'). gsub(/\s+/, '_'). tr("-", "_"). downcase end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
htcht-0.1.6 | lib/htcht/helpers/name_helpers.rb |
htcht-0.1.3 | lib/htcht/helpers/name_helpers.rb |