Sha256: 7f19e7f209e2e413c85891f26ad26573e32cb3b5b3093d95651908cedff87d40

Contents?: true

Size: 352 Bytes

Versions: 6

Compression:

Stored size: 352 Bytes

Contents

module RelatonW3c
  class DocumentType < RelatonBib::DocumentType
    DOCTYPES = %w[groupNote technicalReport].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

6 entries across 6 versions & 1 rubygems

Version Path
relaton-w3c-1.18.1 lib/relaton_w3c/document_type.rb
relaton-w3c-1.18.0 lib/relaton_w3c/document_type.rb
relaton-w3c-1.17.3 lib/relaton_w3c/document_type.rb
relaton-w3c-1.17.2 lib/relaton_w3c/document_type.rb
relaton-w3c-1.17.1 lib/relaton_w3c/document_type.rb
relaton-w3c-1.17.0 lib/relaton_w3c/document_type.rb