check if a key exists in hash ruby code example Example: rails check if key exists object.key? :some_key