Sha256: 35308c305814c4c64174a4991a4dc91eacbbced544160c78a80d0536810f7684

Contents?: true

Size: 544 Bytes

Versions: 3

Compression:

Stored size: 544 Bytes

Contents

module RelatonIec
  class DocumentType < RelatonBib::DocumentType
    DOCTYPES = %w[
      international-standard technical-specification technical-report
      publicly-available-specification international-workshop-agreement
      guide industry-technical-agreement system-reference-deliverable
    ].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

3 entries across 3 versions & 1 rubygems

Version Path
relaton-iec-1.18.1 lib/relaton_iec/document_type.rb
relaton-iec-1.18.0 lib/relaton_iec/document_type.rb
relaton-iec-1.17.0 lib/relaton_iec/document_type.rb