Class: Pubid::Iso::Identifier::InternationalStandard
- Inherits:
-
Base
- Object
- Core::Identifier::Base
- Base
- Pubid::Iso::Identifier::InternationalStandard
- Defined in:
- lib/pubid/iso/identifier/international_standard.rb
Constant Summary collapse
- TYPED_STAGES =
{ dp: { abbr: "DP", name: "Draft Proposal", harmonized_stages: %w[], }, dis: { abbr: "DIS", name: "Draft International Standard", harmonized_stages: %w[40.00 40.20 40.60 40.92 40.93 40.98 40.99], }, fdis: { abbr: "FDIS", name: "Final Draft International Standard", harmonized_stages: %w[50.00 50.20 50.60 50.92 50.98 50.99], }, wdr: { abbr: "WDR", name: "Proposed for Withdrawal", harmonized_stages: %w[90.92], }, wda: { abbr: "WDA", name: "Withdrawal Approved", harmonized_stages: %w[90.93], }, wdar: { abbr: "WDAR", name: "Withdrawal Archived", harmonized_stages: %w[95.99], }, is: { abbr: "IS", name: "International Standard", harmonized_stages: %w[60.00 60.60], }, }.freeze
Instance Attribute Summary
Attributes inherited from Base
#addendum, #base, #dirtype, #iteration, #joint_document, #jtc_dir, #month, #scnumber, #sctype, #stage, #supplements, #tcnumber, #tctype, #wgnumber, #wgtype
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(stage: nil, iteration: nil, **opts) ⇒ InternationalStandard
constructor
A new instance of InternationalStandard.
- #typed_stage_abbrev ⇒ Object
Methods inherited from Base
create_supplements, get_amendment_class, get_corrigendum_class, get_identifier, get_parser_class, get_renderer_class, get_transformer_class, get_update_codes, #render_all_parts, #render_joint_document, #resolve_format, #root, supplement_by_type, supplements_has_type?, #to_s, transform, transform_supplements, type_match?, #urn
Constructor Details
#initialize(stage: nil, iteration: nil, **opts) ⇒ InternationalStandard
Returns a new instance of InternationalStandard.
44 45 46 47 48 49 50 |
# File 'lib/pubid/iso/identifier/international_standard.rb', line 44 def initialize(stage: nil, iteration: nil, **opts) if iteration && stage.nil? raise Errors::IsStageIterationError, "IS stage document cannot have iteration" end super end |
Class Method Details
.type ⇒ Object
60 61 62 |
# File 'lib/pubid/iso/identifier/international_standard.rb', line 60 def self.type { key: :is, title: "International Standard", short: nil } end |
Instance Method Details
#typed_stage_abbrev ⇒ Object
52 53 54 55 56 57 58 |
# File 'lib/pubid/iso/identifier/international_standard.rb', line 52 def typed_stage_abbrev if self.class::TYPED_STAGES.key?(stage) super else stage&.abbr end end |