title: What does ||= mean?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/995593/what-does-or-equals-mean-in-ruby">What does ||= (or equals) mean in Ruby?</a><br>
    <a href="https://stackoverflow.com/questions/7556902/what-does-mean">What does ||= mean?</a>  </p>
  </blockquote>
  
  
  
  <p>I have just started learning RubyMotion and in a lot of examples I see the <code>||=</code> syntax.  What does this mean?</p>
  
  <p>Here is an example:</p>
  
  <pre><code>def window
    @window ||= begin
      w = UIWindow.alloc.initWithFrame UIScreen.mainScreen.bounds
      w.rootViewController = @navigationController
      w
  end
  </code></pre>
  
  <p>It is difficult to search symbols, google ignored the symbols in my query.</p>