Class: IOStreams::Tabular::Parser::Fixed::Layout

Inherits:
Object
  • Object
show all
Defined in:
lib/io_streams/tabular/parser/fixed.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(layout) ⇒ Layout

Returns [Array<FixedLayout>] the layout for this fixed width file. Also validates values



117
118
119
120
# File 'lib/io_streams/tabular/parser/fixed.rb', line 117

def initialize(layout)
  @length  = 0
  @columns = parse_layout(layout)
end

Instance Attribute Details

#columnsObject (readonly)

Returns the value of attribute columns.



113
114
115
# File 'lib/io_streams/tabular/parser/fixed.rb', line 113

def columns
  @columns
end

#lengthObject (readonly)

Returns the value of attribute length.



113
114
115
# File 'lib/io_streams/tabular/parser/fixed.rb', line 113

def length
  @length
end