Sha256: 4d9d643c379564f897e5e4cb65329490317aaf7ce3a228e2a9d1e29fb61f1b11

Contents?: true

Size: 383 Bytes

Versions: 7

Compression:

Stored size: 383 Bytes

Contents

module Relaton
  module Plateau
    class DocumentType < RelatonBib::DocumentType
      DOCTYPES = %w[handbook technical-report annex].freeze

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

      def check_type(type)
        return if DOCTYPES.include? type

        Util.warn "invalid doctype: `#{type}`"
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
relaton-plateau-1.20.0 lib/relaton/plateau/document_type.rb
relaton-plateau-1.19.5 lib/relaton/plateau/document_type.rb
relaton-plateau-1.19.4 lib/relaton/plateau/document_type.rb
relaton-plateau-1.19.3 lib/relaton/plateau/document_type.rb
relaton-plateau-1.19.2 lib/relaton/plateau/document_type.rb
relaton-plateau-1.19.1 lib/relaton/plateau/document_type.rb
relaton-plateau-1.19.0 lib/relaton/plateau/document_type.rb