Ruby 'is_a?' class or module required (TypeError)
You need to put the class Integer
in parentheses:
unless @response.is_a?(Integer) && @response.to_str.length == 4
You are actually evaulating is_a?
on (Integer && @response.to_str.length == 4)
which is a boolean value, not a class or module.