summaryrefslogtreecommitdiffstats
path: root/lib/roo/excelx/styles.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/roo/excelx/styles.rb')
-rw-r--r--lib/roo/excelx/styles.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/roo/excelx/styles.rb b/lib/roo/excelx/styles.rb
index 87f1713..25f0bf0 100644
--- a/lib/roo/excelx/styles.rb
+++ b/lib/roo/excelx/styles.rb
@@ -55,9 +55,9 @@ module Roo
end
def extract_num_fmts
- Hash[doc.xpath('//numFmt').map do |num_fmt|
- [num_fmt['numFmtId'], num_fmt['formatCode']]
- end]
+ doc.xpath('//numFmt').each_with_object({}) do |num_fmt, hash|
+ hash[num_fmt['numFmtId']] = num_fmt['formatCode']
+ end
end
end
end