Class: PmdTester::SimpleProgressLogger
- Inherits:
-
Object
- Object
- PmdTester::SimpleProgressLogger
- Includes:
- PmdTester
- Defined in:
- lib/pmdtester/builders/simple_progress_logger.rb
Overview
Helper class that provides a simple progress logging
Constant Summary
Constants included from PmdTester
BASE, PATCH, PR_NUM_ENV_VAR, VERSION
Instance Method Summary collapse
-
#initialize(task_name) ⇒ SimpleProgressLogger
constructor
A new instance of SimpleProgressLogger.
- #start ⇒ Object
- #stop ⇒ Object
Methods included from PmdTester
Constructor Details
#initialize(task_name) ⇒ SimpleProgressLogger
Returns a new instance of SimpleProgressLogger.
9 10 11 |
# File 'lib/pmdtester/builders/simple_progress_logger.rb', line 9 def initialize(task_name) @task_name = task_name end |
Instance Method Details
#start ⇒ Object
13 14 15 16 17 18 19 20 21 |
# File 'lib/pmdtester/builders/simple_progress_logger.rb', line 13 def start logger.info "Starting #{@task_name}" = 1 @scheduler = Rufus::Scheduler.new @scheduler.every '2m' do logger.info "Still #{@task_name} (#{})..." += 1 end end |
#stop ⇒ Object
23 24 25 |
# File 'lib/pmdtester/builders/simple_progress_logger.rb', line 23 def stop @scheduler.shutdown end |