Flowdock
method

cover?

Importance_1
v5.2.3 - Show latest stable - 0 notes - Class: CompareWithRange
cover?(value) public

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

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

The native Range#cover? behavior is untouched.

('a'..'f').cover?('c') # => true
(5..9).cover?(11) # => false
Show source
Register or log in to add new notes.