title: How do I use the conditional operator (? :) in Ruby?
body: <p>How is the conditional operator (<code>? :</code>) used in Ruby?</p>
  
  <p>For example, is this correct?</p>
  
  <pre><code>&lt;% question = question.size &gt; 20 ? question.question.slice(0, 20)+"..." : question.question %&gt;
  </code></pre>