class String
this is a monkey patching over the String class to bring the camelcase method from rails
Public Instance Methods
camelize()
click to toggle source
the famous camelize method so useful in metaprogramming
# File lib/cogbot/utils.rb, line 6 def camelize self.downcase! self.gsub!(/(?:_| )?(.)([^_ ]*)/) { "#{$1.upcase}#{$2}" } end