class IsoDoc::Csand::Metadata
A {Converter} implementation that generates CSAND output, and a document schema encapsulation of the document for validation
Public Class Methods
new(lang, script, labels)
click to toggle source
Calls superclass method
# File lib/isodoc/csand/metadata.rb, line 8 def initialize(lang, script, labels) super end
Public Instance Methods
docid(isoxml, _out)
click to toggle source
# File lib/isodoc/csand/metadata.rb, line 28 def docid(isoxml, _out) docnumber = isoxml.at(ns("//bibdata/docidentifier[@type = 'csand']")) set(:docnumber, docnumber&.text) end
status_abbr(status)
click to toggle source
# File lib/isodoc/csand/metadata.rb, line 33 def status_abbr(status) case status when "working-draft" then "wd" when "committee-draft" then "cd" when "draft-standard" then "d" else "" end end
subtitle(_isoxml, _out)
click to toggle source
# File lib/isodoc/csand/metadata.rb, line 17 def subtitle(_isoxml, _out) nil end
title(isoxml, _out)
click to toggle source
# File lib/isodoc/csand/metadata.rb, line 12 def title(isoxml, _out) main = isoxml&.at(ns("//bibdata/title[@language='en']"))&.text set(:doctitle, main) end
unpublished(status)
click to toggle source
# File lib/isodoc/csand/metadata.rb, line 43 def unpublished(status) !%w(published withdrawn).include? status.downcase end