class IsoDoc::Acme::Metadata

Attributes

_file[RW]

Public Class Methods

inherited( k ) click to toggle source
# File lib/isodoc/acme/metadata.rb, line 18
def self.inherited( k )
  k._file = caller_locations.first.absolute_path
end
new(lang, script, labels) click to toggle source
Calls superclass method
# File lib/isodoc/acme/metadata.rb, line 7
def initialize(lang, script, labels)
  super
  here = File.dirname(__FILE__)
  default_logo_path = File.expand_path(File.join(here, "html", "logo.jpg"))
  set(:logo, baselocation(configuration.logo_path) || default_logo_path)
end

Public Instance Methods

author(isoxml, _out) click to toggle source
Calls superclass method
# File lib/isodoc/acme/metadata.rb, line 31
def author(isoxml, _out)
  super
  tc = isoxml.at(ns("//bibdata/ext/editorialgroup/committee"))
  set(:tc, tc.text) if tc
end
baselocation(loc) click to toggle source
# File lib/isodoc/acme/metadata.rb, line 22
def baselocation(loc)
  return nil if loc.nil?
  File.expand_path(File.join(File.dirname(self.class::_file || __FILE__), "..", "..", "..", loc))
end
configuration() click to toggle source
# File lib/isodoc/acme/metadata.rb, line 27
def configuration
  Metanorma::Acme.configuration
end
stage_abbr(status) click to toggle source
Calls superclass method
# File lib/isodoc/acme/metadata.rb, line 37
def stage_abbr(status)
  return super unless configuration.stage_abbreviations
  Hash(configuration.stage_abbreviations).dig(status)
end
unpublished(status) click to toggle source
# File lib/isodoc/acme/metadata.rb, line 42
def unpublished(status)
  stages = configuration&.published_stages || ["published"]
  !(Array(stages).map { |m| m.downcase }.include? status.downcase)
end