Sha256: a49bfcbd6dcfc56f45475d3c313fb04e608c2eac7843b34c032aad498c1391e5

Contents?: true

Size: 445 Bytes

Versions: 2

Compression:

Stored size: 445 Bytes

Contents

module RelatonCalconnect
  class DocumentType < RelatonBib::DocumentType
    DOCTYPES = %w[
      directive guide specification standard report administrative amendment
      technical\ corrigendum advisory
    ].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

2 entries across 2 versions & 1 rubygems

Version Path
relaton-calconnect-1.19.1 lib/relaton_calconnect/document_type.rb
relaton-calconnect-1.19.0 lib/relaton_calconnect/document_type.rb