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



105
106
107
108
109
110
# File 'lib/neovim/output.rb', line 105

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

#write(*args) ⇒ Object



96
97
98
99
100
101
102
103
104
# File 'lib/neovim/output.rb', line 96

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