Sha256: e371aa98a55f755877add9cffc620fd147466677d9a0221641574593d919c674

Contents?: true

Size: 454 Bytes

Versions: 2

Compression:

Stored size: 454 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 "WARNING: invalid doctype: `#{type}`"
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
relaton-calconnect-1.18.0 lib/relaton_calconnect/document_type.rb
relaton-calconnect-1.17.0 lib/relaton_calconnect/document_type.rb