lib/io_streams/tabular/header.rb in iostreams-0.19.0 vs lib/io_streams/tabular/header.rb in iostreams-0.20.0

- old
+ new

@@ -84,11 +84,11 @@ # cleanse [true|false] # Whether to cleanse and narrow the supplied hash to just those columns in this header. # Only Applies to when the hash is already a Hash. # Useful to turn off narrowing when the input data is already trusted. def to_hash(row, cleanse = true) - return if IOStreams.blank?(row) + return if IOStreams::Utils.blank?(row) case row when Array raise(IOStreams::Errors::InvalidHeader, "Missing mandatory header when trying to convert a row into a hash") unless columns array_to_hash(row) @@ -110,10 +110,10 @@ private def array_to_hash(row) h = {} - columns.each_with_index { |col, i| h[col] = row[i] unless IOStreams.blank?(col) } + columns.each_with_index { |col, i| h[col] = row[i] unless IOStreams::Utils.blank?(col) } h end # Perform cleansing on returned Hash keys during the narrowing process. # For example, avoids issues with case etc.