Class: Pubid::Xsf::UrnParser

Inherits:
UrnParser::Base show all
Defined in:
lib/pubid/xsf/urn_parser.rb

Overview

Parses XSF URNs back into identifiers.

UrnGenerator emits: urn:xsf:xep:<number> (e.g. urn:xsf:xep:0001). This inverts it by reconstructing the printed "XEP " string and delegating to the flavor's text parser.

Instance Method Summary collapse

Methods inherited from UrnParser::Base

parse

Instance Method Details

#parse_urn(urn) ⇒ Object



11
12
13
14
15
# File 'lib/pubid/xsf/urn_parser.rb', line 11

def parse_urn(urn)
  body = strip_namespace(urn)
  _type, number = split_parts(body)
  flavor_parse("XEP #{number}")
end