Method: Neovim::Logging::Text#initialize

Defined in:
lib/neovim/logging.rb

#initialize(file, color: nil, short: nil, maxlen: 256) ⇒ Text

Returns a new instance of Text.



128
129
130
131
132
133
134
135
136
137
138
# File 'lib/neovim/logging.rb', line 128

def initialize file, color: nil, short: nil, maxlen: 256
  super
  @color =
    case color
    when true, false then color
    when 0           then false
    when Integer     then true
    else                  @file.tty?
    end
  @short, @maxlen = short, maxlen
end