Skip to content

Commit

Permalink
Merge pull request #2415 from sul-dlss/move-mods-parsing-local
Browse files Browse the repository at this point in the history
Move mods parsing local
  • Loading branch information
corylown authored Jul 3, 2024
2 parents 2738713 + c8e53a5 commit 0c66892
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions app/models/purl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,14 @@ def public_xml
end

def smods_rec
public_xml_record.stanford_mods
@smods_rec ||= Stanford::Mods::Record.new.tap do |smods_rec|
smods_rec.from_str(public_xml_record.mods.to_s)
end
end

delegate :mods_display, to: :public_xml_record
def mods_display
@mods_display ||= ModsDisplay::HTML.new(smods_rec)
end

def collections
@collections ||= public_xml_record.collections.map do |record|
Expand Down

0 comments on commit 0c66892

Please sign in to comment.