Sha256: 94b408cb46eb8132759696f5a7d41c5657dee1552b1f9c28d610645cd53db5e9

Contents?: true

Size: 608 Bytes

Versions: 4

Compression:

Stored size: 608 Bytes

Contents

module RelatonItu
  class DocumentType < RelatonBib::DocumentType
    TYPES = %w[
      recommendation recommendation-supplement recommendation-amendment
      recommendation-corrigendum recommendation-errata recommendation-annex
      focus-group implementers-guide technical-paper technical-report
      joint-itu-iso-iec resolution service-publication handbook question
    ].freeze

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

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

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
relaton-itu-1.19.3 lib/relaton_itu/document_type.rb
relaton-itu-1.19.2 lib/relaton_itu/document_type.rb
relaton-itu-1.19.1 lib/relaton_itu/document_type.rb
relaton-itu-1.19.0 lib/relaton_itu/document_type.rb