Sha256: a57cbccbefa5492932c088bdf042cdea4397adccc7b460649c9c5239f93094ab

Contents?: true

Size: 406 Bytes

Versions: 3

Compression:

Stored size: 406 Bytes

Contents

module RelatonJis
  class DocumentType < RelatonBib::DocumentType
    DOCTYPES = %w[japanese-industrial-standard technical-report technical-specification amendment].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

3 entries across 3 versions & 1 rubygems

Version Path
relaton-jis-1.18.1 lib/relaton_jis/document_type.rb
relaton-jis-1.18.0 lib/relaton_jis/document_type.rb
relaton-jis-1.17.0 lib/relaton_jis/document_type.rb