Class: Bosh::Cli::TaskLogRenderer
- Inherits:
-
Object
- Object
- Bosh::Cli::TaskLogRenderer
show all
- Defined in:
- lib/cli/task_log_renderer.rb
Instance Attribute Summary collapse
Class Method Summary
collapse
Instance Method Summary
collapse
Constructor Details
Returns a new instance of TaskLogRenderer.
21
22
23
24
25
26
27
28
|
# File 'lib/cli/task_log_renderer.rb', line 21
def initialize
@out = Bosh::Cli::Config.output || $stdout
@out.sync = true
@lock = Mutex.new
@output = ""
@time_adjustment = 0
@duration = nil
end
|
Instance Attribute Details
Returns the value of attribute duration.
19
20
21
|
# File 'lib/cli/task_log_renderer.rb', line 19
def duration
@duration
end
|
#time_adjustment ⇒ Object
Returns the value of attribute time_adjustment.
18
19
20
|
# File 'lib/cli/task_log_renderer.rb', line 18
def time_adjustment
@time_adjustment
end
|
Class Method Details
.create_for_log_type(log_type) ⇒ Object
Instance Method Details
#add_output(output) ⇒ Object
34
35
36
|
# File 'lib/cli/task_log_renderer.rb', line 34
def add_output(output)
@output = output
end
|
#duration_known? ⇒ Boolean
30
31
32
|
# File 'lib/cli/task_log_renderer.rb', line 30
def duration_known?
false end
|
#finish(state) ⇒ Object
43
44
45
46
|
# File 'lib/cli/task_log_renderer.rb', line 43
def finish(state)
refresh
@done = true
end
|
38
39
40
41
|
# File 'lib/cli/task_log_renderer.rb', line 38
def refresh
@out.print(@output)
@output = ""
end
|