lib/sportradar/api/data.rb in sportradar-api-0.12.3 vs lib/sportradar/api/data.rb in sportradar-api-0.13.0
- old
+ new
@@ -63,10 +63,11 @@
existing[current.id] = current
end
existing[current.id]
end
when Hash
- existing[data[identifier]] = klass.new(data, **opts)
+ existing[data[identifier]] ||= klass.new(data, **opts)
+ existing[data[identifier]].update(data, **opts)
else
# raise
end
existing
end