Sha256: 9e60a061f1cd9138eef306e4c2625a8f8c540338740e2489401c3fa49d2a5596

Contents?: true

Size: 428 Bytes

Versions: 5

Compression:

Stored size: 428 Bytes

Contents

module RelatonIeee
  class DocumentType < RelatonBib::DocumentType
    DOCTYPES = %w[guide recommended-practice standard witepaper redline other].freeze

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

    def check_type(type)
      unless DOCTYPES.include? type
        Util.warn "Invalid doctype: `#{type}`. It should be one of: `#{DOCTYPES.join('`, `')}`."
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
relaton-ieee-1.20.0 lib/relaton_ieee/document_type.rb
relaton-ieee-1.19.3 lib/relaton_ieee/document_type.rb
relaton-ieee-1.19.2 lib/relaton_ieee/document_type.rb
relaton-ieee-1.19.1 lib/relaton_ieee/document_type.rb
relaton-ieee-1.19.0 lib/relaton_ieee/document_type.rb