Class: Pubid::Nist::Identifiers::DatedDocument
- Defined in:
- lib/pubid/nist/identifiers/dated_document.rb
Overview
NIST date-style identifier with no series. Examples:
- "NIST 2022-04-15 001" (short) / "NIST.2022-04-15.001" (mr/doi) DOI 10.6028/NIST.2022-04-15.001
Constant Summary collapse
- TYPED_STAGES =
Empty so the bare "NIST" abbr never shadows a series lookup; the Router guard (parsed_hash && :dated_seq) is the dispatch path.
[].freeze
Class Method Summary collapse
Instance Method Summary collapse
- #to_abbreviated_style ⇒ Object
-
#to_full_style ⇒ Object
No series/number to expand; non-default formats fall back to short.
- #to_mr_style ⇒ Object
- #to_short_style ⇒ Object
Class Method Details
.type ⇒ Object
25 26 27 |
# File 'lib/pubid/nist/identifiers/dated_document.rb', line 25 def type { key: :dated, title: "NIST Dated Document" } end |
.typed_stages ⇒ Object
21 22 23 |
# File 'lib/pubid/nist/identifiers/dated_document.rb', line 21 def typed_stages TYPED_STAGES end |
Instance Method Details
#to_abbreviated_style ⇒ Object
43 44 45 |
# File 'lib/pubid/nist/identifiers/dated_document.rb', line 43 def to_abbreviated_style to_short_style end |
#to_full_style ⇒ Object
No series/number to expand; non-default formats fall back to short.
39 40 41 |
# File 'lib/pubid/nist/identifiers/dated_document.rb', line 39 def to_full_style to_short_style end |
#to_mr_style ⇒ Object
34 35 36 |
# File 'lib/pubid/nist/identifiers/dated_document.rb', line 34 def to_mr_style "#{publisher || 'NIST'}.#{date_year}-#{date_month}-#{date_day}.#{dated_seq}" end |
#to_short_style ⇒ Object
30 31 32 |
# File 'lib/pubid/nist/identifiers/dated_document.rb', line 30 def to_short_style "#{publisher || 'NIST'} #{date_year}-#{date_month}-#{date_day} #{dated_seq}" end |