Class: Pubid::Ashrae::Identifiers::Addendum
- Inherits:
-
SupplementIdentifier
- Object
- Lutaml::Model::Serializable
- Identifier
- Base
- SupplementIdentifier
- Pubid::Ashrae::Identifiers::Addendum
- Defined in:
- lib/pubid/ashrae/identifiers/addendum.rb
Overview
Addendum identifier for ASHRAE standards and guidelines Examples:
-
ASHRAE Addendum a to Standard 15-2001
-
ASHRAE Addendum a to Guideline 1.4-2019
-
ANSI/ASHRAE Addendum a to ANSI/ASHRAE Standard 15-2019
-
ASHRAE Standard 15-2013 Addendum a
Constant Summary collapse
- TYPED_STAGES =
[ Components::TypedStage.new( abbr: ["Addendum", "Addenda"], type_code: "addendum", stage_code: "published", ), ].freeze
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from SupplementIdentifier
Methods inherited from Base
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
Class Method Details
.type ⇒ Object
26 27 28 |
# File 'lib/pubid/ashrae/identifiers/addendum.rb', line 26 def self.type { key: :addendum, title: "ASHRAE Addendum", short: "Addendum" } end |
Instance Method Details
#copublisher ⇒ Object
49 50 51 |
# File 'lib/pubid/ashrae/identifiers/addendum.rb', line 49 def copublisher base_identifier&.copublisher end |
#to_s ⇒ Object
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/pubid/ashrae/identifiers/addendum.rb', line 30 def to_s return base_identifier.to_s unless base_identifier # Determine base type name for rendering base_type = base_identifier.type || "Standard" if copublisher # Format: ANSI/ASHRAE Addendum a to ANSI/ASHRAE Standard 15-2019 result = "#{copublisher} Addendum #{addendum_code} to #{base_identifier}" else # Format: ASHRAE Addendum a to Standard 15-2001 result = "ASHRAE Addendum #{addendum_code} to #{base_type} #{base_identifier.code}" result += "-#{base_identifier.year}" if base_identifier.year end result += " (#{addendum_date})" if addendum_date result end |