Class: XfOOrth::XfOOrth_OutStream

Inherits:
Object
  • Object
show all
Defined in:
lib/fOOrth/library/out_stream_library.rb

Overview

  • The fOOrth InStream file input mini-class.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(file_name, file_mode) ⇒ XfOOrth_OutStream

Set up the OutStream for the given file name.
Parameters

  • file_name - The name of the file.

  • file_mode - The mode to use opening the file. Either ‘w’ or ‘a’



18
19
20
21
22
# File 'lib/fOOrth/library/out_stream_library.rb', line 18

def initialize(file_name, file_mode)
  @file = File.new(file_name, file_mode)
rescue
  error "F51: Unable to open the file #{file_name} for writing."
end

Instance Attribute Details

#fileObject (readonly)

The file used to perform the actual input operations.



12
13
14
# File 'lib/fOOrth/library/out_stream_library.rb', line 12

def file
  @file
end