class RuboCop::Cop::Style::NilComparison

Checks for comparison of something with nil using ‘==` and `nil?`.

Supported styles are: predicate, comparison.

@example EnforcedStyle: predicate (default)

# bad
if x == nil
end

# good
if x.nil?
end

@example EnforcedStyle: comparison

# bad
if x.nil?
end

# good
if x == nil
end