Class: Pubid::Oiml::UrnParser
- Inherits:
-
UrnParser::Base
- Object
- UrnParser::Base
- Pubid::Oiml::UrnParser
- Defined in:
- lib/pubid/oiml/urn_parser.rb
Overview
Parses OIML URNs back into identifiers.
UrnGenerator emits: ‘urn:oiml:type:number` where type is the lowercase document class (r for Recommendation, d for Document).
Examples:
-
urn:oiml:r:111-1 → OIML R 111-1
-
urn:oiml:d:1 → OIML D 1
Instance Method Summary collapse
Methods inherited from UrnParser::Base
Instance Method Details
#parse_urn(urn) ⇒ Object
14 15 16 17 18 19 |
# File 'lib/pubid/oiml/urn_parser.rb', line 14 def parse_urn(urn) body = strip_namespace(urn) parts = split_parts(body) type_token, number = parts flavor_parse("OIML #{type_token.upcase} #{number}") end |