Sha256: cd978493dffcf909bff363d1232a1b693c187514ac54d19e5250efa99f0ef241

Contents?: true

Size: 424 Bytes

Versions: 2

Compression:

Stored size: 424 Bytes

Contents

module Relaton3gpp
  class DocumentType < RelatonBib::DocumentType
    DOCTYPES = %w[TS TR].freeze

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

    # @param type [String]
    def check(type)
      unless DOCTYPES.include? type
        Util.warn "WARNING: Unknown doctype: `#{type}`"
        Util.warn "WARNING: Possible doctypes: `#{DOCTYPES.join '`, `'}`"
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
relaton-3gpp-1.18.0 lib/relaton_3gpp/document_type.rb
relaton-3gpp-1.17.0 lib/relaton_3gpp/document_type.rb