Sha256: 7664fe31be35b9cd816866b80772dafd10cf099232450aa633aa2ab9f97e4c0b
Contents?: true
Size: 476 Bytes
Versions: 17
Compression:
Stored size: 476 Bytes
Contents
# frozen_string_literal: true require 'stanford-mods' ## # A convenience object for parsing and rendering MODS module ModsDisplay class Record attr_reader :xml def initialize(xml) @xml = xml end def mods_record return if xml.nil? @mods_record ||= Stanford::Mods::Record.new.tap { |mods| mods.from_str(xml) } end def mods_display_html return unless mods_record ModsDisplay::HTML.new(mods_record) end end end
Version data entries
17 entries across 17 versions & 1 rubygems