One can often find similar code in the wild:
has_something? predicates are not idiomatic in Ruby and
Hash#has_value? are nothing, but remnants of the
early days of Ruby. In fact, according to Matz, they are
in favor of
The above snippet should look like:
As usual – you can use RuboCop to identify and fix such shortfalls of your code.