Sha256: 22b87ebf5657431908fd4dc6acc36cdc59f39095bad562605c544055aea6aa16
Contents?: true
Size: 886 Bytes
Versions: 1
Compression:
Stored size: 886 Bytes
Contents
module RelatonIsoBib class DocumentType < RelatonBib::DocumentType DOCTYPES = %w[ international-standard technical-specification technical-report publicly-available-specification international-workshop-agreement guide recommendation amendment technical-corrigendum directive committee-document ].freeze # # Create a new DocumentType object. # # @param [String] type document type # @param [String, nil] abbreviation type abbreviation # def initialize(type:, abbreviation: nil) check_doctype type super end # # Check if type is valid. # # @param [String] type document type # def check_doctype(type) unless DOCTYPES.include? type Util.warn "WARNING: invalid doctype: `#{type}`" Util.warn "Allowed doctypes are: `#{DOCTYPES.join('`, `')}`" end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
relaton-iso-bib-1.18.2 | lib/relaton_iso_bib/document_type.rb |