class RuboCop::Cop::Performance::RangeInclude

(‘a’..‘z’).cover?(‘yellow’) # => true
# the desired result:
# Example of a case where ‘Range#cover?` may not provide
(’a’..‘z’).cover?(‘b’) # => true
# good
(‘a’..‘z’).include?(‘b’) # => true
# bad
@example
`Range#cover?‘ are not equivalent behaviour.
This cop is `Safe: false` by default because `Range#include?` and
is wanted.
end points of the `Range`. In a great majority of cases, this is what
`Range#cover?` simply compares the target item with the beginning and
item in a `Range` to see if a specified item is there. In contrast,
This cop identifies uses of `Range#include?`, which iterates over each

def autocorrect(node)

def autocorrect(node)
  ->(corrector) { corrector.replace(node.loc.selector, 'cover?') }
end

def on_send(node)

def on_send(node)
  return unless range_include(node)
  add_offense(node, location: :selector)
end