How to check if a specific key is present in a hash or not? September 8, 2022 by Tarik Hash‘s key? method tells you whether a given key is present or not. session.key?("user")