Sha256: c6a743776261d0e0066fbd98b07c136a1d7a7ac48ad0d4b1916dd132414c5e3a

Contents?: true

Size: 456 Bytes

Versions: 3

Compression:

Stored size: 456 Bytes

Contents

module RelatonUn
  class DocumentType < RelatonBib::DocumentType
    DOCTYPES = %w[
      recommendation plenary addendum communication corrigendum reissue agenda
      budgetary sec-gen-notes expert-report resolution
    ].freeze

    def initialize(type:, abbreviation: nil)
      check_type type
      super
    end

    def check_type(type)
      unless DOCTYPES.include? type
        Util.warn "invalid doctype: `#{type}`"
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
relaton-un-1.20.1 lib/relaton_un/document_type.rb
relaton-un-1.20.0 lib/relaton_un/document_type.rb
relaton-un-1.19.0 lib/relaton_un/document_type.rb