Class: Pubid::Nist::Identifiers::CircularSupplement

Inherits:
SupplementIdentifier show all
Defined in:
lib/pubid/nist/identifiers/circular_supplement.rb

Overview

NBS Circular Supplement Identifier Wraps a base Circular identifier with supplement information

Examples:

  • "NBS CIRC 101e2supp" → CircularSupplement(base: Circular(101, e2))
  • "NBS CIRC 25supp-1924" → CircularSupplement(base: Circular(25), edition: 1924)
  • "NBS CIRC suppJun1925-Jun1926" → CircularSupplement(edition with date range)

Constant Summary collapse

TYPED_STAGES =

NOTE: CircularSupplement uses same TYPED_STAGES as Circular It's a variant edition pattern, not a separate series type

[
  Pubid::Components::TypedStage.new(
    abbr: ["CIRC", "NBS CIRC"],
    stage_code: "published",
    type_code: "circ",
  ),
].freeze

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from SupplementIdentifier

#publisher, #series

Class Method Details

.typeObject



29
30
31
32
# File 'lib/pubid/nist/identifiers/circular_supplement.rb', line 29

def type
  { key: :circ_supp,
  web: :circular_supplement, title: "NBS Circular Supplement", short: "CIRC" }
end

.typed_stagesObject



25
26
27
# File 'lib/pubid/nist/identifiers/circular_supplement.rb', line 25

def typed_stages
  TYPED_STAGES
end

Instance Method Details

#to_s(format = :short) ⇒ Object



39
40
41
42
43
44
45
46
47
# File 'lib/pubid/nist/identifiers/circular_supplement.rb', line 39

def to_s(format = :short)
  # Handle date range supplements (no base identifier)
  if supplement_date_range_start && supplement_date_range_end
    return "NBS CIRC sup#{supplement_date_range_start}-#{supplement_date_range_end}"
  end

  # Use parent's rendering for base + supplement
  super
end