Class: Pubid::Adobe::Renderer
- Inherits:
-
Renderers::Base
- Object
- Renderers::Base
- Pubid::Adobe::Renderer
- Defined in:
- lib/pubid/adobe/renderer.rb
Overview
Human-readable renderer for Adobe identifiers.
Produces the canonical citation forms:
"Adobe TN 5014" (tech note)
"Adobe Publication adobe-glyph-list" (publication, slug)
"Adobe Publication adobe-japan1-7" (publication, slug + version)
The data repo (AdobeFetcher::Docid) overrides #to_s for publications to use the title from metadata instead of the slug, producing e.g. "Adobe Publication Adobe Glyph List". Pubid::Adobe itself is purely structural and renders slug-form citations.
Constant Summary
Constants inherited from Renderers::Base
Renderers::Base::SEMANTIC_SPLIT, Renderers::Base::TYPED_STAGE_CSS
Instance Method Summary collapse
Methods inherited from Renderers::Base
Constructor Details
This class inherits a constructor from Pubid::Renderers::Base
Instance Method Details
#render(context: nil, **_opts) ⇒ Object
17 18 19 20 21 22 23 24 |
# File 'lib/pubid/adobe/renderer.rb', line 17 def render(context: nil, **_opts) id = @id return render_tech_note(id) if id.is_a?(Identifiers::TechNote) return render_publication(id) if id.is_a?(Identifiers::Publication) raise ArgumentError, "Unknown Adobe identifier class: #{id.class}" end |