Search
Range has a method include? which can be used to find if a value is in a given range.
include?
Let's find out if 45 lies within the range 30 to 50:
Now, let's check if 80 lies within the range 20 to 40.