Sha256: e89d98c7ee0378d1d2f4f3ea6dff8327c36e2c741977ae157494feb656fe99d5

Contents?: true

Size: 346 Bytes

Versions: 2

Compression:

Stored size: 346 Bytes

Contents

module RelatonIetf
  class DocumentType < RelatonBib::DocumentType
    DOCTYPES = %w[rfc internet-draft].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-ietf-1.18.0 lib/relaton_ietf/document_type.rb
relaton-ietf-1.17.0 lib/relaton_ietf/document_type.rb