class ThreadAttrAccessor::ThreadStorage
Attributes
thread[R]
Public Class Methods
new(thread)
click to toggle source
# File lib/thread_attr_accessor.rb, line 58 def initialize(thread) @thread = thread end
Public Instance Methods
[](key)
click to toggle source
# File lib/thread_attr_accessor.rb, line 62 def [](key) thread.thread_variable_get(key) end
[]=(key, value)
click to toggle source
# File lib/thread_attr_accessor.rb, line 66 def []=(key, value) thread.thread_variable_set(key, value) end
has_key?(key)
click to toggle source
# File lib/thread_attr_accessor.rb, line 70 def has_key?(key) !!thread.thread_variable_get(key) end