Sha256: a5220dca501f407d1b40614aadec7dbad3812944c688972656852c7367fefa61

Contents?: true

Size: 409 Bytes

Versions: 19

Compression:

Stored size: 409 Bytes

Contents

class RemoteTable
  module FixedWidth
    def each_row(&block)
      backup_file!
      convert_file_to_utf8!
      crop_rows!
      skip_rows!
      cut_columns!
      a = Slither.parse(path, schema_name)
      a[:rows].each do |hash|
        hash.reject! { |k, v| k.blank? }
        yield hash if keep_blank_rows or hash.any? { |k, v| v.present? }
      end
    ensure
      restore_file!
    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
remote_table-0.2.22 lib/remote_table/file/fixed_width.rb
remote_table-0.2.21 lib/remote_table/file/fixed_width.rb
remote_table-0.2.20 lib/remote_table/file/fixed_width.rb
remote_table-0.2.19 lib/remote_table/file/fixed_width.rb
remote_table-0.2.18 lib/remote_table/file/fixed_width.rb
remote_table-0.2.17 lib/remote_table/file/fixed_width.rb
remote_table-0.2.16 lib/remote_table/file/fixed_width.rb
remote_table-0.2.15 lib/remote_table/file/fixed_width.rb
remote_table-0.2.14 lib/remote_table/file/fixed_width.rb
remote_table-0.2.13 lib/remote_table/file/fixed_width.rb
remote_table-0.2.12 lib/remote_table/file/fixed_width.rb
remote_table-0.2.11 lib/remote_table/file/fixed_width.rb
remote_table-0.2.10 lib/remote_table/file/fixed_width.rb
remote_table-0.2.9 lib/remote_table/file/fixed_width.rb
remote_table-0.2.8 lib/remote_table/file/fixed_width.rb
remote_table-0.2.7 lib/remote_table/file/fixed_width.rb
remote_table-0.2.6 lib/remote_table/file/fixed_width.rb
remote_table-0.2.5 lib/remote_table/file/fixed_width.rb
remote_table-0.2.4 lib/remote_table/file/fixed_width.rb