cocina_display 1.2.1 → 1.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/cocina_display/related_resource.rb +3 -3
- data/lib/cocina_display/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 13fa31ddb1ced6dce4cff9ba6c23273a717c517853724b0338834c8bc0584053
|
4
|
+
data.tar.gz: 393ea9fd0d3b923526eb2ef9165d1341bd0a59d4053e5cd0d3994cdc4b2e0ad2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 269e719358ed43c1b76ff2f9a7dc63b2fca62f5fd3b1e9fd2a08b9fd978f3d052347a06424c5b06b54e64b39b32330cb77a6ee0ba840cae8b4b0f3ffeb578c10
|
7
|
+
data.tar.gz: 8227461a14e0a326652b49d32582ab7847b1946a7851e3b2b6f8123b5a5a21efbce2d4d86ff754c9ab65ac6bae315cdeb0fe4a9bbd159dd64199c0d522a061fd
|
@@ -38,14 +38,14 @@ module CocinaDisplay
|
|
38
38
|
# String representation of the related resource.
|
39
39
|
# @return [String, nil]
|
40
40
|
def to_s
|
41
|
-
|
41
|
+
display_data.flat_map(&:values).first
|
42
42
|
end
|
43
43
|
|
44
44
|
# URL to the related resource for link construction.
|
45
45
|
# If there are multiple URLs, uses the first.
|
46
46
|
# @return [String, nil]
|
47
47
|
def url
|
48
|
-
urls.
|
48
|
+
(urls.map(&:to_s) + identifiers.map(&:uri) + [purl_url]).compact.first
|
49
49
|
end
|
50
50
|
|
51
51
|
# Is this a related resource with a URL?
|
@@ -59,7 +59,7 @@ module CocinaDisplay
|
|
59
59
|
# @note Used for extended display of citations, e.g. on hp566jq8781.
|
60
60
|
# @return [Array<DisplayData>]
|
61
61
|
def display_data
|
62
|
-
title_display_data + contributor_display_data + general_note_display_data + preferred_citation_display_data + access_display_data
|
62
|
+
title_display_data + contributor_display_data + general_note_display_data + preferred_citation_display_data + access_display_data + identifier_display_data
|
63
63
|
end
|
64
64
|
|
65
65
|
private
|