Sha256: c6e0f5fcc5f073e4d829dd7045502874b82d549ec6c9bbe0b474e418e0db8220

Contents?: true

Size: 689 Bytes

Versions: 3

Compression:

Stored size: 689 Bytes

Contents

module RelatonBsi
  class DocumentType < RelatonBib::DocumentType
    DOCTYPES = %w[
      british-standard draft-for-development published-document privately-subscribed-standard
      publicly-available-specification flex-standard international-standard technical-specification
      technical-report guide international-workshop-agreement industry-technical-agreement
      standard european-workshop-agreement fast-track-standard expert-commentary
    ].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-bsi-1.20.0 lib/relaton_bsi/document_type.rb
relaton-bsi-1.19.1 lib/relaton_bsi/document_type.rb
relaton-bsi-1.19.0 lib/relaton_bsi/document_type.rb