Module: RemoteTable::FixedWidth

Defined in:
lib/remote_table/file/fixed_width.rb

Instance Method Summary collapse

Instance Method Details

#each_row(&block) ⇒ Object



3
4
5
6
7
8
9
10
11
12
13
# File 'lib/remote_table/file/fixed_width.rb', line 3

def each_row(&block)
  crop_rows!
  skip_rows!
  cut_columns!
  a = Slither.parse(path, schema_name)
  a[:rows].each { |row| yield HashWithIndifferentAccess.new(row) }
ensure
  uncut_columns!
  unskip_rows!
  uncrop_rows!
end