Class: Pubid::Nist::Identifiers::InteragencyReport
- Defined in:
- lib/pubid/nist/identifiers/internal_report.rb
Overview
NIST Interagency Report (IR) / NISTIR Examples:
- "NIST IR 8115" = Interagency Report 8115
- "NIST IR 8115r1" = Interagency Report 8115 revision 1
- "NBS IR 73-197" = NBS Interagency Report 73-197
Constant Summary collapse
- TYPED_STAGES =
[ Pubid::Components::TypedStage.new( abbr: ["IR", "NIST IR", "NBS IR"], stage_code: "published", type_code: "ir", ), ].freeze
Class Method Summary collapse
Instance Method Summary collapse
- #series_code ⇒ Object
-
#to_s(format = nil) ⇒ String
Override to_s to normalize MR input to short format by default But allow explicit format requests (e.g., format: :mr).
Class Method Details
.type ⇒ Object
25 26 27 28 |
# File 'lib/pubid/nist/identifiers/internal_report.rb', line 25 def type { key: :ir, web: :interagency_report, title: "NIST Interagency Report", short: "IR" } end |
.typed_stages ⇒ Object
21 22 23 |
# File 'lib/pubid/nist/identifiers/internal_report.rb', line 21 def typed_stages TYPED_STAGES end |
Instance Method Details
#series_code ⇒ Object
31 32 33 |
# File 'lib/pubid/nist/identifiers/internal_report.rb', line 31 def series_code "IR" end |
#to_s(format = nil) ⇒ String
Override to_s to normalize MR input to short format by default But allow explicit format requests (e.g., format: :mr)
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
# File 'lib/pubid/nist/identifiers/internal_report.rb', line 39 def to_s(format = nil) # Handle both keyword argument (hash) and positional argument (symbol/string) effective_format = if format.is_a?(Hash) format[:format] else format end # If explicit format is specified, use it. Otherwise, default to short. if effective_format.nil? super(:short) else super(effective_format) end end |