Sha256: 0e94181cd094cc63ef9131691c2431e81cbee7ef8a4cd4837d8e16e35b78bf17

Contents?: true

Size: 535 Bytes

Versions: 3

Compression:

Stored size: 535 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 "Invalid doctype: `#{type}`"
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
relaton-iec-1.20.0 lib/relaton_iec/document_type.rb
relaton-iec-1.19.1 lib/relaton_iec/document_type.rb
relaton-iec-1.19.0 lib/relaton_iec/document_type.rb