lib/cogbot/utils.rb in cogbot-0.1.2 vs lib/cogbot/utils.rb in cogbot-0.1.3
- old
+ new
@@ -1,6 +1,9 @@
+# this is a monkey patching over the String class
+# to bring the camelcase method from rails
class String
+ # the famous camelize method so useful in metaprogramming
def camelize
self.downcase!
self.gsub!(/(?:_| )?(.)([^_ ]*)/) { "#{$1.upcase}#{$2}" }
end