Method: ConfCtl::Cli::LogView#initialize
- Defined in:
- lib/confctl/cli/log_view.rb
#initialize(header: nil, title: nil, size: 10, reserved_lines: 0, output: $stdout) ⇒ LogView
Returns a new instance of LogView.
55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 |
# File 'lib/confctl/cli/log_view.rb', line 55 def initialize(header: nil, title: nil, size: 10, reserved_lines: 0, output: $stdout) @cursor = TTY::Cursor @outmutex = Mutex.new @inlines = Queue.new @outlines = [] @header = header @title = title || 'Log' @size = size @current_size = size if size != :auto @reserved_lines = reserved_lines @output = output @enabled = output.respond_to?(:tty?) && output.tty? @resized = false @stop = false @generation = 0 @rendered = 0 end |