Class: Hoss::Instrumenter::Current Private
- Inherits:
-
Object
- Object
- Hoss::Instrumenter::Current
- 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
- #events ⇒ Object private
- #events=(events) ⇒ Object private
-
#initialize ⇒ Current
constructor
private
A new instance of Current.
Constructor Details
#initialize ⇒ Current
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
#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.
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 |