title: (Ruby) How do you check whether a range contains a subset of another range?
body: <p>If I have two ranges that overlap:</p>
  
  <pre><code>x = 1..10
  y = 5..15
  </code></pre>
  
  <p>When I say:</p>
  
  <pre><code>puts x.include? y 
  </code></pre>
  
  <p>the output is: </p>
  
  <pre><code>false 
  </code></pre>
  
  <p>because the two ranges only overlap partially.</p>
  
  <p>But if I want it to be "true" when there is partial overlap between two ranges, how would I write that? In other words I need a way to know when one range contains a subset of another range. I assume there's an elegant way to write this in Ruby but the only solutions I can think of are verbose.</p>