Class: Rvim::Editor::RedirFile

Inherits:
Object
  • Object
show all
Defined in:
lib/rvim/editor.rb

Instance Method Summary collapse

Constructor Details

#initialize(path, mode) ⇒ RedirFile

Returns a new instance of RedirFile.



324
325
326
# File 'lib/rvim/editor.rb', line 324

def initialize(path, mode)
  @file = File.open(path, mode)
end

Instance Method Details

#<<(msg) ⇒ Object



328
329
330
331
# File 'lib/rvim/editor.rb', line 328

def <<(msg)
  @file.puts(msg)
  @file.flush
end

#closeObject



333
334
335
# File 'lib/rvim/editor.rb', line 333

def close
  @file.close
end