method

include?

v2_2_9 - Show latest stable - Class: Hash
include?(p1)
public

Returns true if the given key is present in hsh.

h = { "a" => 100, "b" => 200 }
h.has_key?("a")   #=> true
h.has_key?("z")   #=> false