Class: Pubid::Iec::Identifiers::TestReportForm
- Inherits:
-
Base
- Object
- Lutaml::Model::Serializable
- Pubid::Identifier
- Pubid::Iec::Identifier
- SingleIdentifier
- Base
- Pubid::Iec::Identifiers::TestReportForm
- Defined in:
- lib/pubid/iec/identifiers/test_report_form.rb
Overview
Test Report Form identifier class Single Responsibility: Represents IEC TRF documents Can embed CISPR identifiers for IECEE TRF format
Constant Summary collapse
- TYPED_STAGES =
TRF has type abbreviation for parsing
[ Pubid::Components::TypedStage.new( code: :trf, stage_code: :published, type_code: :trf, abbr: ["TRF"], name: "Test Report Form", harmonized_stages: %w[60.00 60.60], ), ].freeze
Constants inherited from Pubid::Iec::Identifier
Pubid::Iec::Identifier::IEC_TYPE_MAP
Class Method Summary collapse
Instance Method Summary collapse
-
#publisher_portion ⇒ Object
Override publisher_portion to add TRF with space.
Methods inherited from Base
Methods inherited from SingleIdentifier
#edition_portion, #language_portion, #number_portion, #to_s
Methods inherited from Pubid::Iec::Identifier
#all_parts_from_kv, #all_parts_to_kv, #build_code, build_type_map, #copublishers_from_kv, #copublishers_to_kv, #day_from_kv, #day_to_kv, default_publisher, #emit_code, #month_from_kv, #month_to_kv, #number_from_kv, #number_to_kv, parse, #part_from_kv, #part_to_kv, published_typed_stage, #publisher_from_kv, #publisher_to_kv, #stage, #stage_from_kv, #stage_iteration_from_kv, #stage_iteration_to_kv, #stage_to_kv, #subpart_from_kv, #subpart_to_kv, #type, #undated_from_kv, #undated_to_kv, #year_from_kv, #year_to_kv
Methods inherited from Pubid::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?, #initialize, #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
This class inherits a constructor from Pubid::Identifier
Class Method Details
.type ⇒ Object
26 27 28 29 |
# File 'lib/pubid/iec/identifiers/test_report_form.rb', line 26 def self.type { key: :trf, web: :test_report_form, title: "Test Report Form", short: "TRF" } end |
Instance Method Details
#publisher_portion ⇒ Object
Override publisher_portion to add TRF with space
32 33 34 35 36 37 38 39 40 |
# File 'lib/pubid/iec/identifiers/test_report_form.rb', line 32 def publisher_portion result = publisher.to_s if typed_stage && typed_stage.abbreviation == "TRF" result += " TRF" end result end |