title: Ruby: One-Line If-Then-Else
body: <p>I am wondering if there is a way in Ruby to write a one-line if-then-else statement using words as operators, in a manner similar to python's</p>
  
  <pre><code>a if b else c
  </code></pre>
  
  <p>I am aware of the classic ternary conditional, but I have the feeling Ruby is more of a "wordsey" language than a "symboley" language, so I am trying to better encapsulate the spirit of the language.</p>
  
  <p>I also am aware of this method,</p>
  
  <pre><code>if a then b else c end
  </code></pre>
  
  <p>which is basically squishing a multi-liner onto one line, but the <code>end</code> at the end of the line feels cumbersome and redundant.  I think the ternary conditional would be preferable to this.</p>
  
  <p>So for you who know Ruby well, is there a better way to write this? If not, which of the methods is the most Rubyesque?</p>
  
  <hr>
  
  <p><strong>The following questions are not addressed by the linked post:</strong></p>
  
  <ol>
  <li>Is there a cleaner way than <code>if a then b else c end</code> to write a "wordsey" one-line if-then-else in Ruby?</li>
  <li>Is the ternary conditional or the wordsey version more appropriate for the Ruby paradigm?</li>
  </ol>