Class: LogSinks::Pumps::InThreadPump
- Inherits:
-
Object
- Object
- LogSinks::Pumps::InThreadPump
- Defined in:
- lib/log_sinks/pumps/in_thread_pump.rb
Overview
A pump that drains events to the sink in the current thread
Direct Known Subclasses
Instance Method Summary collapse
-
#initialize(sink) ⇒ InThreadPump
constructor
A new instance of InThreadPump.
- #receive(event) ⇒ Object
Constructor Details
#initialize(sink) ⇒ InThreadPump
Returns a new instance of InThreadPump.
7 8 9 |
# File 'lib/log_sinks/pumps/in_thread_pump.rb', line 7 def initialize(sink) @sink = sink end |
Instance Method Details
#receive(event) ⇒ Object
11 12 13 |
# File 'lib/log_sinks/pumps/in_thread_pump.rb', line 11 def receive(event) @sink.drain event end |