I have created the following code:def LetterCapitalize(str)  str = str.split( ).each {|word| word.capitalize!}  str = str.join( )  return strendThis takes in a basic string and capitalizes the first letter of all of the words. It looks kind of awkward to reassign things to str twice. What is wrong with my style here, if anything at all?
Capitalize all words in sentence string in Ruby
ruby;strings