Class: Gallus::Output::File

Inherits:
Stream
  • Object
show all
Defined in:
lib/gallus/output/file.rb

Overview

Public: A thread safe IO stream output that writes to given file.

Instance Method Summary collapse

Methods inherited from Stream

#call, #call!

Constructor Details

#initialize(filename, format) ⇒ File

Returns a new instance of File.



5
6
7
8
# File 'lib/gallus/output/file.rb', line 5

def initialize(filename, format)
  @file = ::File.open(filename, 'a+')
  super(@file, format)
end

Instance Method Details

#closeObject



10
11
12
# File 'lib/gallus/output/file.rb', line 10

def close
  @file.close
end