aboutsummaryrefslogtreecommitdiffstats
path: root/lib/roo/excelx/relationships.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/roo/excelx/relationships.rb')
-rw-r--r--lib/roo/excelx/relationships.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/roo/excelx/relationships.rb b/lib/roo/excelx/relationships.rb
index 8a0ed97..19f9919 100644
--- a/lib/roo/excelx/relationships.rb
+++ b/lib/roo/excelx/relationships.rb
@@ -16,9 +16,9 @@ module Roo
def extract_relationships
return [] unless doc_exists?
- Hash[doc.xpath('/Relationships/Relationship').map do |rel|
- [rel.attribute('Id').text, rel]
- end]
+ doc.xpath('/Relationships/Relationship').each_with_object({}) do |rel, hash|
+ hash[rel['Id']] = rel
+ end
end
end
end