Class: AsciiDataTools::InputSource

Inherits:
Struct
  • Object
show all
Defined in:
lib/ascii-data-tools/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#filenameObject

Returns the value of attribute filename

Returns:

  • (Object)

    the current value of filename



115
116
117
# File 'lib/ascii-data-tools/configuration.rb', line 115

def filename
  @filename
end

#streamObject

Returns the value of attribute stream

Returns:

  • (Object)

    the current value of stream



115
116
117
# File 'lib/ascii-data-tools/configuration.rb', line 115

def stream
  @stream
end

Instance Method Details

#has_records?Boolean

Returns:

  • (Boolean)


120
121
122
# File 'lib/ascii-data-tools/configuration.rb', line 120

def has_records?
  not stream.eof?
end

#readObject



116
117
118
# File 'lib/ascii-data-tools/configuration.rb', line 116

def read
  stream.readline
end