Class: Neovim::WriteOut

Inherits:
WriteStd show all
Defined in:
lib/neovim/output.rb

Instance Method Summary collapse

Methods inherited from WriteStd

redirect

Methods inherited from Write

#<<, #flush, #initialize, open, #print, #puts

Constructor Details

This class inherits a constructor from Neovim::Write

Instance Method Details

#finishObject



74
75
76
77
78
79
# File 'lib/neovim/output.rb', line 74

def finish
  if @line_open then
    @client.out_write $/
    @line_open = nil
  end
end

#write(*args) ⇒ Object



65
66
67
68
69
70
71
72
73
# File 'lib/neovim/output.rb', line 65

def write *args
  args.each { |a|
    a = a.to_s
    a.notempty? or next
    @client.out_write a
    @line_open = !(a.end_with? $/)
  }
  nil
end