title: Single interface to values from Array or Hash
body: <p>Trying to get the values out of a collection that could be either an <code>Array</code> or a <code>Hash</code>, but switching based on type seems awkward:</p>
  
  <pre><code>def values_from_collection(array_or_hash)
    case array_or_hash
    when array_or_hash.is_a? Array
        array_or_hash
    when array_or_hash.is_a? Hash
        array_or_hash.values
    end
  end 
  </code></pre>
  
  <p>Is seems like there should be a single interface/method that both classes support, but nothing obvious stands out in <code>Enumerable</code>.  Is there a standard way to accomplish this?</p>