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 number = 5
I would like to check 1 <= number <= 10
and retrieve a boolean value if the number
value is included in that range.
I can do that like this:
number >= 1 && number <= 10
but I would like to do that in one statement. How can I do that?