Class: Pubid::Itu::Identifiers::Question
- Inherits:
-
Pubid::Itu::Identifier
- Object
- Lutaml::Model::Serializable
- Pubid::Identifier
- Pubid::Itu::Identifier
- Pubid::Itu::Identifiers::Question
- Includes:
- StandardSerialization
- Defined in:
- lib/pubid/itu/identifiers/question.rb
Overview
ITU Question — the study topics assigned to a study group.
Two printed forms, both modelled by this one class:
* numeric (no series): ITU-R 234-1/7: ITU-R 237/3:
number(-part)/study-group, always with a trailing ":".
* letter-series: ITU-R P.3/BL/7 ITU-R SM.1/30
series.number(/BL)?/study-group, optionally bracketed and/or with a
trailing ":" — e.g. ITU-R S.[4/BL/2]:
The /study-group, the optional "/BL" segment, the surrounding
brackets and the trailing ":" have no home on Components::Code, so they
are carried here and reconstructed exactly by render_base.
Constant Summary
Constants inherited from Pubid::Itu::Identifier
Pubid::Itu::Identifier::LANGUAGES
Instance Method Summary collapse
Methods included from StandardSerialization
Methods inherited from Pubid::Itu::Identifier
#base_from_kv, #base_to_kv, #code_for, #common_text_twin_from_kv, #common_text_twin_to_kv, #date_for, #emit_kv, #exclude_from_nested, #imp_marker_from_kv, #imp_marker_to_kv, #initialize, #month_from_kv, #month_to_kv, #mr_number_with_part, #mr_publisher, #mr_type, normalize_to_s_opts, #number, #number_from_kv, #number_to_kv, parse, #parts_from_kv, #parts_to_kv, #qualifier_from_kv, #qualifier_glued_from_kv, #qualifier_glued_to_kv, #qualifier_to_kv, #render_date_suffix, #render_language_suffix, #sector_from_kv, #sector_to_kv, #series_from_kv, #series_suffix_from_kv, #series_suffix_spaced_from_kv, #series_suffix_spaced_to_kv, #series_suffix_to_kv, #series_to_kv, #subseries_from_kv, #subseries_to_kv, #to_s, #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::Itu::Identifier
Instance Method Details
#==(other) ⇒ Object
49 50 51 52 53 54 55 56 57 58 59 |
# File 'lib/pubid/itu/identifiers/question.rb', line 49 def ==(other) return false unless other.is_a?(Question) sector == other.sector && series == other.series && code == other.code && study_group == other.study_group && has_bl == other.has_bl && bracketed == other.bracketed && has_colon == other.has_colon end |
#render_base(**_opts) ⇒ Object
37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/pubid/itu/identifiers/question.rb', line 37 def render_base(**_opts) result = "#{publisher}-#{sector}" result += series ? " #{series}." : " " result += "[" if bracketed result += code.to_s result += "/BL" if has_bl result += "/#{study_group}" result += "]" if bracketed result += ":" if has_colon result end |