title: How to encapsulate many Ruby case conditions within a single object?
body: <p>I would like to simplify my code that performs a single action when multiple conditions apply. Here's a simplified example:</p>
  
  <pre><code>case button
  when 'up', 'upper-right', 'right', 'lower-right', 'down', 'lower-left', 'left', 'upper-left' 
    move_direction(button)
  else
    do_something_else
  end
  </code></pre>
  
  <p>If I could encapsulate those options into something like a class or a constant, that would be helpful, but I'm not sure how to do that or if it's even possible. How can I encapsulate these conditions?</p>