Sha256: de765d503746b61f076cebe824725fdc730f0eb39d58778d1683590b7fc7716c
Contents?: true
Size: 276 Bytes
Versions: 11
Compression:
Stored size: 276 Bytes
Contents
# 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 end
Version data entries
11 entries across 11 versions & 1 rubygems