Class: Tarbit::StatisticWatcher
- Inherits:
-
Object
- Object
- Tarbit::StatisticWatcher
- Defined in:
- lib/tarbit/statistic_watcher.rb
Instance Method Summary collapse
-
#initialize(server, interval = 600) ⇒ StatisticWatcher
constructor
A new instance of StatisticWatcher.
- #watch ⇒ Object
Constructor Details
#initialize(server, interval = 600) ⇒ StatisticWatcher
Returns a new instance of StatisticWatcher.
8 9 10 11 12 |
# File 'lib/tarbit/statistic_watcher.rb', line 8 def initialize(server, interval = 600) @server = server @interval = interval @history = [] end |
Instance Method Details
#watch ⇒ Object
14 15 16 17 18 19 20 21 |
# File 'lib/tarbit/statistic_watcher.rb', line 14 def watch Async do |task| while true task.sleep @interval create_point_in_time end end end |