method

key?

v1_8_7_72 - Show latest stable - Class: Thread
key?(p1)
public

Returns true if the given string (or symbol) exists as a thread-local variable.

   me = Thread.current
   me[:oliver] = "a"
   me.key?(:oliver)    #=> true
   me.key?(:stanley)   #=> false