title: Ruby conditions
body: <p>I want to take any truthy value from two expressions, for example <code>2</code>, or take nothing. It can be done as:</p>
  
  <pre><code>if exp1
    a = exp1
  elsif exp2
    a = exp2
  end
  </code></pre>
  
  <p>I tried to make it short, and have the following:</p>
  
  <pre><code>a = 1 if exp1|| 2 if exp2
  </code></pre>
  
  <p>However ruby returns <code>1</code> in this case. What is the correct syntax in ruby to do this?</p>