title: How to check if a number is included in a range (in one statement)?
body: <p>I am using Ruby on Rails 3.0.9 and I would like to check if a number is included in a range. That is, if I have a variable <code>number = 5</code> I would like to check <code>1 &lt;= number &lt;= 10</code> and retrieve a boolean value if the <code>number</code> value is included in that range.</p>
  
  <p>I can do that like this:</p>
  
  <pre><code>number &gt;= 1 &amp;&amp; number &lt;= 10
  </code></pre>
  
  <p>but I would like to do that in one statement. How can I do that?</p>