Skip to content

Commit

Permalink
Appease standardrb
Browse files Browse the repository at this point in the history
  • Loading branch information
moseshll committed Mar 29, 2023
1 parent 132496a commit 7313245
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/oai_solr/dublin_core_crosswalk.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7313245

Please sign in to comment.