Sha256: 3f194a2e280520749a99d50b5f08d8ef52ef2242aa8e94b774d526aaa38fa9c5

Contents?: true

Size: 340 Bytes

Versions: 2

Compression:

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

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
relaton-gb-1.20.0 lib/relaton_gb/document_type.rb
relaton-gb-1.19.0 lib/relaton_gb/document_type.rb