From 7313245617da14f584cb5da1a962dd78caf5a1fd Mon Sep 17 00:00:00 2001 From: "Brian \"Moses\" Hall" Date: Wed, 29 Mar 2023 11:14:50 -0400 Subject: [PATCH] Appease standardrb --- lib/oai_solr/dublin_core_crosswalk.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/oai_solr/dublin_core_crosswalk.rb b/lib/oai_solr/dublin_core_crosswalk.rb index 114c23d..6330d6f 100644 --- a/lib/oai_solr/dublin_core_crosswalk.rb +++ b/lib/oai_solr/dublin_core_crosswalk.rb @@ -90,9 +90,9 @@ class DublinCoreCrosswalk # If it's necessary to add a field that does not have an identically-named # accessor, or is not in MAPPINGS, some adjustment may be necessary, def full_map(rec) - fields = MAPPINGS.keys + %i(type date) - Hash[fields.map {|field| [ field, self.send(field, rec)] }] - .reject { |k, v| v.empty? } + fields = MAPPINGS.keys + %i[type date] + fields.map { |field| [field, send(field, rec)] } + .to_h.reject { |k, v| v.empty? } end # Get the best date possible, looking for four digits in the 008, then