Being more Ruby 2.1-friendly
parent
c8e6f9803c
commit
4be222a915
|
|
@ -81,9 +81,11 @@ module Squib
|
||||||
hash[new_header] ||= table[header]
|
hash[new_header] ||= table[header]
|
||||||
end
|
end
|
||||||
if import.strip?
|
if import.strip?
|
||||||
|
new_hash = Hash.new
|
||||||
hash.each do |header, col|
|
hash.each do |header, col|
|
||||||
col.map! { |str| str.strip! if str.respond_to?(:strip); str }
|
new_hash[header] = col.map { |str| str = str.strip if str.respond_to?(:strip); str }
|
||||||
end
|
end
|
||||||
|
hash = new_hash
|
||||||
end
|
end
|
||||||
return hash
|
return hash
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue