Class: Pubid::Amca::Identifiers::Interpretation
- Inherits:
-
Base
- Object
- Lutaml::Model::Serializable
- Identifier
- Base
- Pubid::Amca::Identifiers::Interpretation
- Defined in:
- lib/pubid/amca/identifiers/interpretation.rb
Overview
Interpretation identifier for ACMA interpretations Examples:
-
AMCA 99 JW Interp
-
AMCA 204 – 1
-
ANSI/AMCA 204 Interp
Instance Attribute Summary collapse
-
#interpretation_code ⇒ Object
readonly
Returns the value of attribute interpretation_code.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(code:, year: nil, copublisher: nil, suffix: nil, reaffirmed: nil, interpretation_code: nil) ⇒ Interpretation
constructor
A new instance of Interpretation.
- #type ⇒ Object
Methods inherited from Base
#base_hash, parse, #publisher, #to_urn
Methods inherited from Identifier
#base_identifier, #eql?, #exclude, #hash, #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_s, #to_supplement_s, #to_urn, #urn_supplement_type, #urn_type_code, #year
Constructor Details
#initialize(code:, year: nil, copublisher: nil, suffix: nil, reaffirmed: nil, interpretation_code: nil) ⇒ Interpretation
Returns a new instance of Interpretation.
14 15 16 17 18 19 20 21 22 |
# File 'lib/pubid/amca/identifiers/interpretation.rb', line 14 def initialize(code:, year: nil, copublisher: nil, suffix: nil, reaffirmed: nil, interpretation_code: nil) @code = Components::Code.new(value: code.to_s) @year = Components::Date.new(year: year.to_s) if year @copublisher = copublisher @suffix = suffix @reaffirmed = reaffirmed @interpretation_code = interpretation_code end |
Instance Attribute Details
#interpretation_code ⇒ Object (readonly)
Returns the value of attribute interpretation_code.
12 13 14 |
# File 'lib/pubid/amca/identifiers/interpretation.rb', line 12 def interpretation_code @interpretation_code end |
Class Method Details
.type ⇒ Object
24 25 26 |
# File 'lib/pubid/amca/identifiers/interpretation.rb', line 24 def self.type { key: :interpretation, title: "Interpretation", short: "Interp" } end |
Instance Method Details
#type ⇒ Object
28 29 30 |
# File 'lib/pubid/amca/identifiers/interpretation.rb', line 28 def type Interpretation.type end |