title: Refactoring conditional variable assignment
body: <p>I'm working on a project. Currently I have a fairly large conditional statement, that assigns a value to a variable based on some input parameters. So, I have something like this.</p>
  
  <pre><code>if some condition
    x = some value
  elsif another condition
    x = a different value
    ...
  </code></pre>
  
  <p>What's the best way to refactor this? I'm hoping that I might end up with something like</p>
  
  <pre><code>x = some value if some condition || another value if another condition
  </code></pre>
  
  <p>Is there a pattern for this sort of thing?</p>