Sha256: e4c76453d13c98591ad7ab82d513b59bb7cf4358cdd630e82d40c6e4f8406358

Contents?: true

Size: 442 Bytes

Versions: 10

Compression:

Stored size: 442 Bytes

Contents

class RemoteTable
  module FixedWidth
    def each_row(&block)
      backup_file!
      convert_file_to_utf8!
      remove_useless_characters!
      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

10 entries across 10 versions & 2 rubygems

Version Path
remote_table-0.2.32 lib/remote_table/file/fixed_width.rb
remote_table-0.2.31 lib/remote_table/file/fixed_width.rb
remote_table-ruby19-0.2.30 lib/remote_table/file/fixed_width.rb
remote_table-0.2.30 lib/remote_table/file/fixed_width.rb
remote_table-0.2.29 lib/remote_table/file/fixed_width.rb
remote_table-0.2.28 lib/remote_table/file/fixed_width.rb
remote_table-0.2.27 lib/remote_table/file/fixed_width.rb
remote_table-0.2.26 lib/remote_table/file/fixed_width.rb
remote_table-0.2.24 lib/remote_table/file/fixed_width.rb
remote_table-0.2.23 lib/remote_table/file/fixed_width.rb