Skip to content

Commit

Permalink
Use normalize_publisher method in Metadata class
Browse files Browse the repository at this point in the history
  • Loading branch information
codycooperross committed Nov 6, 2023
1 parent 62a2bde commit 714d71a
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions lib/bolognese/metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -217,12 +217,7 @@ def dates
end

def publisher
@publisher ||=
if meta.fetch("publisher", nil).respond_to?(:to_hash)
meta.fetch("publisher", nil)
elsif meta.fetch("publisher", nil).respond_to?(:to_str)
{ "name" => meta.fetch("publisher", nil) }.compact
end
@publisher ||= normalize_publisher(meta.fetch("publisher", nil)) if meta.fetch("publisher", nil).present?
end

def identifiers
Expand Down

0 comments on commit 714d71a

Please sign in to comment.