inquiry
method RB-C1017Prefer 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.
ruby = 'two'.inquiry
ruby.two?
pets = %w(cat dog).inquiry
pets.gopher?
ruby = 'two'
ruby == 'two'
pets = %w(cat dog)
pets.include? 'cat'