Sha256: 2e738d5e33a919c4b69e946a26be87997c1d22a8af97a0ef2435a7ea8b5b5fed

Contents?: true

Size: 349 Bytes

Versions: 6

Compression:

Stored size: 349 Bytes

Contents

module RelatonGb
  class DocumentType < RelatonBib::DocumentType
    DOCTYPES = %w[standard reccomendation].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-gb-1.18.4 lib/relaton_gb/document_type.rb
relaton-gb-1.18.3 lib/relaton_gb/document_type.rb
relaton-gb-1.18.2 lib/relaton_gb/document_type.rb
relaton-gb-1.18.1 lib/relaton_gb/document_type.rb
relaton-gb-1.18.0 lib/relaton_gb/document_type.rb
relaton-gb-1.17.0 lib/relaton_gb/document_type.rb