Rubocop style

apparently #has_key? is deprecated in favour of #key?