Top Level Namespace
Defined Under Namespace
Modules: PoeWatch
Instance Method Summary collapse
Instance Method Details
#snakify(string) ⇒ Object
1 2 3 4 5 6 7 |
# File 'lib/utils.rb', line 1 def snakify(string) string.gsub(/::/, '/'). gsub(/([A-Z]+)([A-Z][a-z])/,'\1_\2'). gsub(/([a-z\d])([A-Z])/,'\1_\2'). tr("-", "_"). downcase end |