Check if a Range includes another Range.

Methods
Public Instance methods
include_with_range?(value)

Extends the default Range#include? to support range comparisons.

 (1..5).include?(1..5) # => true
 (1..5).include?(2..3) # => true
 (1..5).include?(2..6) # => false

The native Range#include? behavior is untouched.

 ("a".."f").include?("c") # => true
 (5..9).include?(11) # => false
    # File activesupport/lib/active_support/core_ext/range/include_range.rb, line 18
18:         def include_with_range?(value)
19:           if value.is_a?(::Range)
20:             operator = exclude_end? ? :< : :<=
21:             end_value = value.exclude_end? ? last.succ : last
22:             include?(value.first) && (value.last <=> end_value).send(operator, 0)
23:           else
24:             include_without_range?(value)
25:           end
26:         end