Class: IOStreams::Tabular::Parser::Fixed::Layout
- Inherits:
-
Object
- Object
- IOStreams::Tabular::Parser::Fixed::Layout
- Defined in:
- lib/io_streams/tabular/parser/fixed.rb
Instance Attribute Summary collapse
-
#columns ⇒ Object
readonly
Returns the value of attribute columns.
-
#length ⇒ Object
readonly
Returns the value of attribute length.
Instance Method Summary collapse
-
#initialize(layout) ⇒ Layout
constructor
Returns [Array<FixedLayout>] the layout for this fixed width file.
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
#columns ⇒ Object (readonly)
Returns the value of attribute columns.
113 114 115 |
# File 'lib/io_streams/tabular/parser/fixed.rb', line 113 def columns @columns end |
#length ⇒ Object (readonly)
Returns the value of attribute length.
113 114 115 |
# File 'lib/io_streams/tabular/parser/fixed.rb', line 113 def length @length end |