title: How do I capitalize all words in a string apart from small words in the middle and in the beginning?
body: <p>I have a long string, "the silver rider on his back and the palm tree". I would like to write a Ruby method that capitalizes all words except "on", "the", and "and" in the middle of the sentence, but have the "the" capitalized at the beginning? </p>
  
  <p>Here is what I have so far:</p>
  
  <pre><code>def title(word)
    small_words = %w[on the and]
    word.split(' ').map  do |w|
      unless small_words.include?(w)
        w.capitalize
      else
        w
      end
    end.join(' ')
  end
  </code></pre>
  
  <p>This code actually does most of what I need but don't know how to include or exclude for that matter the "the" at the beginning of the sentence.</p>