Class: Pubid::Amca::Identifiers::Interpretation
- Inherits:
-
Pubid::Amca::Identifier
- Object
- Lutaml::Model::Serializable
- Identifier
- Pubid::Amca::Identifier
- 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.
Methods inherited from Pubid::Amca::Identifier
#code_from_kv, #code_to_kv, parse, #to_urn, #year_from_kv, #year_to_kv
Methods inherited from 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?, #matches?, #mr_all_parts, #mr_edition, #mr_languages, #mr_number, #mr_number_with_part, #mr_part, #mr_publisher, #mr_subpart, #mr_supplement_suffix, #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
#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 |