module RefreshThreadCurrent

Constants

VERSION

Public Instance Methods

clear_all_local_variables() click to toggle source
# File lib/refresh_thread_current.rb, line 8
def clear_all_local_variables
  clear_thread_local_variables
  clear_fiber_local_variables
end
clear_fiber_local_variables() click to toggle source
# File lib/refresh_thread_current.rb, line 19
def clear_fiber_local_variables
  Thread.current.keys.each { |key| Thread.current[key] = nil }
end
clear_thread_local_variables() click to toggle source
# File lib/refresh_thread_current.rb, line 13
def clear_thread_local_variables
  Thread.current.thread_variables.each do |key|
    Thread.current.thread_variable_set(key, nil)
  end
end