Class: Hoss::Instrumenter::Current Private

Inherits:
Object
  • Object
show all
Defined in:
lib/hoss/instrumenter.rb

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Instance Method Summary collapse

Constructor Details

#initializeCurrent

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of Current.



32
33
34
# File 'lib/hoss/instrumenter.rb', line 32

def initialize
  self.events = []
end

Instance Method Details

#eventsObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



36
37
38
# File 'lib/hoss/instrumenter.rb', line 36

def events
  Thread.current[EVENT_KEY] ||= []
end

#events=(events) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



40
41
42
43
# File 'lib/hoss/instrumenter.rb', line 40

def events=(events)
  Thread.current[EVENT_KEY] ||= []
  Thread.current[EVENT_KEY] = events
end