Method: FileData::ClassMethods#flat_file_data

Defined in:
lib/flat/file_data.rb

#flat_file_dataObject

Container for various points of data as defined in the Flat::File subclass.

Returns a Hash with the following keys:

  • :width - The overall width, or length, of a line in the flat file.

  • :pack_format - A format String for use by String#unpack.

  • :fields - An Array of Field::Definitions

  • :layouts - An Array of Layout::Definitions



25
26
27
28
29
30
31
32
# File 'lib/flat/file_data.rb', line 25

def flat_file_data
  @data ||= {
    :width       => 0,
    :pack_format => '',
    :fields      => [],
    :layouts     => [],
  }
end