capitalize in ruby code example
Example 1: upcase first letters in ruby
“mICHAel”.capitalize
Example 2: capitalize composed name ruby
require 'active_support/core_ext'
"kirk douglas".titleize #=> "Kirk Douglas"
Example 3: capitalize composed name ruby
'one TWO three foUR'.gsub(/\w+/, &:capitalize)