Class: RelatonBipm::DocumentType
- Inherits:
-
RelatonBib::DocumentType
- Object
- RelatonBib::DocumentType
- RelatonBipm::DocumentType
- Defined in:
- lib/relaton_bipm/document_type.rb
Constant Summary collapse
- DOCTYPES =
%w[brochure mise-en-pratique rapport monographie guide meeting-report technical-report working-party-note strategy cipm-mra resolutions].freeze
Instance Method Summary collapse
-
#check_type(type) ⇒ Object
Check if document type is valid.
-
#initialize(type:, abbreviation: nil) ⇒ DocumentType
constructor
Initialize a document type object.
Constructor Details
#initialize(type:, abbreviation: nil) ⇒ DocumentType
Initialize a document type object.
13 14 15 16 |
# File 'lib/relaton_bipm/document_type.rb', line 13 def initialize(type:, abbreviation: nil) check_type type super end |
Instance Method Details
#check_type(type) ⇒ Object
Check if document type is valid.
23 24 25 26 27 |
# File 'lib/relaton_bipm/document_type.rb', line 23 def check_type(type) # unless DOCTYPES.include? type # Util.warn "invalid doctype: `#{type}`" # end end |