diff options
| author | 2019-01-14 01:40:56 -0500 | |
|---|---|---|
| committer | 2019-01-14 01:40:56 -0500 | |
| commit | dddfa903d2b856146f05ffb4415c31d6127bb5bf (patch) | |
| tree | e38c2aca92b54f06ccd0185f48dc47e3e1b3d77e /lib/roo/excelx/relationships.rb | |
| parent | 8280a21a23d44aa90177e2bc041d0b8dc8556f4b (diff) | |
New upstream version 2.8.0upstream/2.8.0
Diffstat (limited to 'lib/roo/excelx/relationships.rb')
| -rw-r--r-- | lib/roo/excelx/relationships.rb | 6 |
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 |
