Class: RelatonOgc::DocumentType

Inherits:
RelatonBib::DocumentType
  • Object
show all
Defined in:
lib/relaton_ogc/document_type.rb

Constant Summary collapse

DOCTYPES =
%w[
  abstract-specification-topic best-practice
  change-request-supporting-document
  community-practice community-standard discussion-paper engineering-report
  other policy reference-model release-notes standard user-guide white-paper
  test-suite draft-standard
].freeze

Instance Method Summary collapse

Constructor Details

#initialize(type:, abbreviation: nil) ⇒ DocumentType

Returns a new instance of DocumentType.



11
12
13
14
# File 'lib/relaton_ogc/document_type.rb', line 11

def initialize(type:, abbreviation: nil)
  check_type type
  super
end

Instance Method Details

#check_type(type) ⇒ Object



16
17
18
19
20
# File 'lib/relaton_ogc/document_type.rb', line 16

def check_type(type)
  unless DOCTYPES.include? type
    Util.warn "invalid doctype: `#{type}`"
  end
end