Class: Pubid::Csa::Scheme

Inherits:
Scheme
  • Object
show all
Defined in:
lib/pubid/csa/scheme.rb

Instance Attribute Summary

Attributes inherited from Scheme

#identifiers, #languages, #publishers, #stages, #supplement_identifiers, #types

Class Method Summary collapse

Methods inherited from Scheme

#all_identifier_classes, #all_typed_stages, #configure, #identifier_class_index, #initialize, #locate_identifier_klass_by_type_code, #locate_typed_stage_by_abbr, #locate_typed_stage_by_harmonized_code, #locate_typed_stage_by_stage_code, #supplement_typed_stages, #typed_stage_index, #typed_stages

Constructor Details

This class inherits a constructor from Pubid::Scheme

Class Method Details

.identifiersObject



7
8
9
10
11
12
13
14
15
16
17
18
# File 'lib/pubid/csa/scheme.rb', line 7

def identifiers
  @identifiers ||= [
    Identifiers::Standard,
    Identifiers::Bundled,
    Identifiers::CanadianAdopted,
    Identifiers::CsaAdopted,
    Identifiers::Package,
    Identifiers::Series,
    Identifiers::Cec,
    Identifiers::Combined,
  ].freeze
end

.locate_identifier_klass_by_type_code(_type_code) ⇒ Object

Raises:

  • (ArgumentError)


37
38
39
40
# File 'lib/pubid/csa/scheme.rb', line 37

def locate_identifier_klass_by_type_code(_type_code)
  raise ArgumentError,
        "CSA identifiers do not use type codes"
end

.locate_typed_stage_by_abbr(_abbr) ⇒ Object

Raises:

  • (ArgumentError)


32
33
34
35
# File 'lib/pubid/csa/scheme.rb', line 32

def locate_typed_stage_by_abbr(_abbr)
  raise ArgumentError,
        "CSA identifiers do not use typed stages"
end

.supplement_identifiersObject



20
21
22
# File 'lib/pubid/csa/scheme.rb', line 20

def supplement_identifiers
  @supplement_identifiers ||= [].freeze
end

.supplement_typed_stagesObject



28
29
30
# File 'lib/pubid/csa/scheme.rb', line 28

def supplement_typed_stages
  @supplement_typed_stages ||= [].freeze
end

.typed_stagesObject



24
25
26
# File 'lib/pubid/csa/scheme.rb', line 24

def typed_stages
  @typed_stages ||= [].freeze
end