lib/ro_crate/model/entity.rb in ro-crate-0.4.17 vs lib/ro_crate/model/entity.rb in ro-crate-0.5.0
- old
+ new
@@ -249,10 +249,10 @@
def linked_entities(deep: false, linked: {})
properties.each_key do |key|
value = properties[key] # We're doing this to call the JSONLDHash#[] method which wraps
value = [value] if value.is_a?(JSONLDHash)
- if value.is_a?(Array)
+ if value.respond_to?(:each)
value.each do |v|
if v.is_a?(JSONLDHash) && !linked.key?(v['@id'])
entity = v.dereference
next unless entity
linked[entity.id] = entity