Ruby

Ruby

Made by DeepSource

Usage of inquiry method RB-C1017

Anti-pattern
Minor

Prefer Ruby’s comparison operators over ActiveSupport’s Array#inquiry, and String#inquiry.

The use of inquiry objects can sometimes make your code less readable. While they can be useful in certain contexts, in other cases, they can make your code harder to understand.

Bad practice

ruby = 'two'.inquiry
ruby.two?

pets = %w(cat dog).inquiry
pets.gopher?

Recommended

ruby = 'two'
ruby == 'two'

pets = %w(cat dog)
pets.include? 'cat'