Class: Pubid::Csa::Identifiers::Series

Inherits:
Base show all
Defined in:
lib/pubid/csa/identifiers/series.rb

Overview

SeriesIdentifier represents CSA identifiers where SERIES is the primary document type, not just a keyword modifier

Examples:

CSA MH SERIES 3.14:20
CSA RV SERIES 1:19
CSA SERIES Z1000:22

Difference from Standard with series_keyword:

- Series: SERIES is the document type (primary)
- Standard: SERIES is a modifier keyword (secondary)

Instance Method Summary collapse

Methods inherited from SingleIdentifier

#code

Methods inherited from Identifier

#base_identifier, #eql?, #exclude, #hash, #initialize, #mr_number, #mr_number_with_part, #mr_part, #mr_publisher, #mr_type, #mr_year, #new_edition_of?, polymorphic_name, #render, #resolve_urn_generator, #root, #to_mr_string, #to_supplement_s, #to_urn, #urn_supplement_type, #urn_type_code

Constructor Details

This class inherits a constructor from Pubid::Identifier

Instance Method Details

#to_sObject



21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# File 'lib/pubid/csa/identifiers/series.rb', line 21

def to_s
  result = publisher_prefix_portion

  # Add code FIRST (before SERIES keyword)
  result += code.to_s

  # Add space before series prefix/SERIES keyword
  result += " "

  # Add series prefix if present
  result += "#{series_prefix} " if series_prefix && !series_prefix.empty?

  # Add SERIES keyword
  result += "SERIES"

  # Add year
  result += year_portion

  # Add language
  result += language_portion

  # Add reaffirmation
  result += reaffirmation_portion

  result
end