def correct_case
      orig = @query.split
      latest = @message.split
      orig.each_with_index do |original_word, j|
        if i = latest.index(original_word.downcase)
          latest[i] = original_word
        end
      end
      @message = latest.join(' ')
    end
def correct_case
      orig = @query.split
      latest = @message.split
      orig.each_with_index do |original_word, j|
        if i = latest.index(original_word.downcase)
          latest[i] = original_word
        end
      end
      @message = latest.join(' ')
    end
def correct_case orig = @query . split latest = @message . split orig . each_with_index do | original_word , j | if i = latest . index ( original_word . downcase ) latest [ i ] = original_word end end @message = latest . join ( ' ' ) end
returns any words in the query that appeared as input to their original case
returns any words in the query that appeared as input to their original case