123456789_123456789_123456789_123456789_123456789_

Class: ActiveSupport::EventContext

Do not use. This class is for internal use only.
Relationships & Source Files
Inherits: Object
Defined in: activesupport/lib/active_support/event_reporter.rb

Constant Summary

Class Method Summary

Class Method Details

.clear

[ GitHub ]

  
# File 'activesupport/lib/active_support/event_reporter.rb', line 63

def clear
  Fiber[FIBER_KEY] = EMPTY_CONTEXT
end

.context

[ GitHub ]

  
# File 'activesupport/lib/active_support/event_reporter.rb', line 52

def context
  Fiber[FIBER_KEY] || EMPTY_CONTEXT
end

.set_context(context_hash)

[ GitHub ]

  
# File 'activesupport/lib/active_support/event_reporter.rb', line 56

def set_context(context_hash)
  new_context = self.context.dup
  context_hash.each { |key, value| new_context[key.to_sym] = value }

  Fiber[FIBER_KEY] = new_context.freeze
end