Class: Pubid::Ieee::Identifiers::Corrigendum

Inherits:
SupplementIdentifier show all
Defined in:
lib/pubid/ieee/identifiers/corrigendum.rb

Overview

Corrigendum identifier for IEEE standards Represents corrections to published standards Example: IEEE Std 535-2013/Cor. 1-2017

Constant Summary collapse

TYPED_STAGES =

TYPED_STAGES for corrigendum Corrigendum uses "Cor" abbreviation

[
  Components::TypedStage.new(
    abbr: ["Cor"],
    type_code: "corrigendum",
    stage_code: "published",
  ),
].freeze

Instance Attribute Summary

Attributes inherited from Pubid::Ieee::Identifier

#code_obj, #draft_obj

Instance Method Summary collapse

Methods inherited from SupplementIdentifier

#code, #publisher, #to_hash

Methods inherited from Pubid::Ieee::Identifier

additional_identifier_classes, #code, #draft, #draft_month, #exclude, from_hash, #initialize, #mr_number_with_part, #mr_publisher, #mr_type, #mr_year, parse, parse_single, #publisher, #to_hash

Methods inherited from Pubid::Identifier

apply_mappings, #base, #base_document, concrete_class_for, #dated_version_of?, #draft_of?, #drop_supplements, #edition_of?, #eql?, #exclude, from_hash, #has_supplement?, #hash, #includes?, #initialize, #matches?, #mr_all_parts, #mr_edition, #mr_languages, #mr_number, #mr_number_with_part, #mr_part, #mr_publisher, #mr_subpart, #mr_type, #mr_year, #new_edition_of?, polymorphic_name, polymorphic_type_map, #related_to?, #render, #resolve_urn_generator, #root, #sibling_of?, #supplement_of?, #to_hash, #to_mr_string, #to_s, #to_slug, #to_supplement_s, #to_urn, #urn_supplement_type, #urn_type_code, #year

Constructor Details

This class inherits a constructor from Pubid::Ieee::Identifier

Instance Method Details

#mr_supplement_suffixObject

MR supplement suffix: cor.{number}.{year} (e.g. "/cor.1.2017"). The MrString renderer recurses into base and appends this so the full IEEE corrigendum round-trips losslessly (issue #142).



31
32
33
34
35
36
# File 'lib/pubid/ieee/identifiers/corrigendum.rb', line 31

def mr_supplement_suffix
  segments = ["cor"]
  segments << number.to_s if number
  segments << year.to_s if year
  segments.join(".")
end