lib/core/facets/string/methodize.rb in facets-2.4.4 vs lib/core/facets/string/methodize.rb in facets-2.4.5

- old
+ new

@@ -3,10 +3,15 @@ # Translate a (class or module) name to a suitable method name. # # My::CoolClass.name.methodize => "my__cool_class" # def methodize - gsub(/([A-Z]+)([A-Z])/,'\1_\2').gsub(/([a-z])([A-Z])/,'\1_\2').gsub('::','__').downcase + gsub(/([A-Z]+)([A-Z])/,'\1_\2'). + gsub(/([a-z])([A-Z])/,'\1_\2'). + gsub('/','__'). + gsub('::','__'). + downcase end end +