Class: Neovim::WriteStd

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

Direct Known Subclasses

WriteBuf, WriteOut

Class Method Summary collapse

Methods inherited from Write

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

Constructor Details

This class inherits a constructor from Neovim::Write

Class Method Details

.redirect(*args, **kwargs) ⇒ Object



84
85
86
87
88
89
90
91
# File 'lib/neovim/output.rb', line 84

def redirect *args, **kwargs
  open *args, **kwargs do |i|
    old, $stdout = $stdout, i
    yield
  ensure
    $stdout = old
  end
end