Class: Fluent::TimerWatcher
- Inherits:
-
Coolio::TimerWatcher
- Object
- Coolio::TimerWatcher
- Fluent::TimerWatcher
- Defined in:
- lib/fluent/plugin/in_spectrum.rb
Overview
class for handling interval in loop
Instance Method Summary collapse
-
#initialize(interval, repeat, &callback) ⇒ TimerWatcher
constructor
A new instance of TimerWatcher.
-
#on_timer ⇒ Object
def initialize.
Constructor Details
#initialize(interval, repeat, &callback) ⇒ TimerWatcher
Returns a new instance of TimerWatcher.
173 174 175 176 |
# File 'lib/fluent/plugin/in_spectrum.rb', line 173 def initialize(interval, repeat, &callback) @callback = callback super(interval, repeat) end |
Instance Method Details
#on_timer ⇒ Object
def initialize
177 178 179 |
# File 'lib/fluent/plugin/in_spectrum.rb', line 177 def on_timer @callback.call end |