key?

thr.key?(sym) â true or false
Instance Public methods

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

me = Thread.current
me[:oliver] = "a"
me.key?(:oliver)    #=> true
me.key?(:stanley)   #=> false
doc_ruby_on_rails
2015-05-17 13:35:20
Comments
Leave a Comment

Please login to continue.