Class: Ticker
- Inherits:
-
Object
- Object
- Ticker
- Defined in:
- backend/app/lib/ticker.rb
Overview
frozen_string_literal: true
Instance Method Summary collapse
-
#initialize(job) ⇒ Ticker
constructor
A new instance of Ticker.
-
#log(s) ⇒ Object
-
#status_update(status_code, status) ⇒ Object
-
#tick ⇒ Object
-
#tick_estimate=(n) ⇒ Object
Constructor Details
#initialize(job) ⇒ Ticker
Returns a new instance of Ticker.
4 5 6 |
# File 'backend/app/lib/ticker.rb', line 4 def initialize(job) @job = job end |
Instance Method Details
#log(s) ⇒ Object
14 15 16 |
# File 'backend/app/lib/ticker.rb', line 14 def log(s) @job.write_output(s) end |
#status_update(status_code, status) ⇒ Object
10 11 12 |
# File 'backend/app/lib/ticker.rb', line 10 def status_update(status_code, status) @job.write_output("#{status[:id]}. #{status_code.upcase}: #{status[:label]}") end |
#tick ⇒ Object
8 |
# File 'backend/app/lib/ticker.rb', line 8 def tick; end |
#tick_estimate=(n) ⇒ Object
18 |
# File 'backend/app/lib/ticker.rb', line 18 def tick_estimate=(n) end |