lib/workbook.rb in rxl-0.3.0 vs lib/workbook.rb in rxl-0.4.0
- old
+ new
@@ -26,10 +26,14 @@
rubyxl_workbook
end
def self.hashes_to_hash_workbook(hash_tables, order, write_headers: true)
hash_workbook = {}
- hash_tables.each { |k, v| hash_workbook[k] = Worksheet.hashes_to_hash_worksheet(v, order, write_headers: write_headers) }
+ all_formats = hash_tables.delete(:formats) || {}
+ hash_tables.each do |k, v|
+ formats = all_formats[k]
+ hash_workbook[k] = Worksheet.hashes_to_hash_worksheet(v, order, formats, write_headers: write_headers)
+ end
hash_workbook
end
def self.hash_workbook_to_hash_tables(hash_workbook)
hash_workbook.keys.each_with_object({}) do |key, hash_tables|
\ No newline at end of file