Class: Pubid::Itu::UrnParser
- Inherits:
-
UrnParser::Base
- Object
- UrnParser::Base
- Pubid::Itu::UrnParser
- Defined in:
- lib/pubid/itu/urn_parser.rb
Overview
Parses ITU URNs back into identifiers.
UrnGenerator emits: ‘urn:itu:sector:code` where sector is the lowercase ITU sector letter (t for ITU-T, r for ITU-R, d for ITU-D) and code is the document code (e.g., “BO.1073-1”).
Examples:
-
urn:itu:t:BO.1073-1 → ITU-T BO.1073-1
-
urn:itu:r:BO.500 → ITU-R BO.500
Instance Method Summary collapse
Methods inherited from UrnParser::Base
Instance Method Details
#parse_urn(urn) ⇒ Object
15 16 17 18 19 20 |
# File 'lib/pubid/itu/urn_parser.rb', line 15 def parse_urn(urn) body = strip_namespace(urn) parts = split_parts(body) sector, code = parts flavor_parse("ITU-#{sector.upcase} #{code}") end |