title: '||=' operator in Ruby
body: <p>Could some one explain to me the meaning of the following Ruby code? (I saw this code snippet in one guy's project):</p>
  
  <pre><code>car ||= (method_1 || method_2 || method_3 || method_4)
  </code></pre>
  
  <p>What is the difference between the above code and the following code?</p>
  
  <pre><code>car = method_1 || method_2 || method_3 || method_4
  </code></pre>
  
  <p><strong>----------update--------------</strong></p>
  
  <p>Ok, I got the meaning of <code>||=</code> operator after read @Dave's explanation, my <strong>next question</strong> is if both <code>method_2</code>, <code>method_3</code> and <code>method_4</code> return a value, which one's value will be assigned to <code>car</code>? (I suppose <code>car</code> is <strong>nil</strong> initially)</p>