Class: Pubid::Amca::Renderer
- Inherits:
-
Renderers::Base
- Object
- Renderers::Base
- Pubid::Amca::Renderer
- Defined in:
- lib/pubid/amca/renderer.rb
Overview
Human-readable renderer for AMCA identifiers.
Produces strings like:
"AMCA Standard 210-16"
"AMCA Publication 211-22 (Rev. 01-23)"
"ANSI/AMCA 204 Interp"
"AMCA 99 JW Interp"
The renderer is registered as the ‘:human` format in the AMCA format registry and invoked via `render(format: :human)`.
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
16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/pubid/amca/renderer.rb', line 16 def render(context: nil, **opts) id = @id case id when Identifiers::Publication render_publication(id) when Identifiers::Interpretation render_interpretation(id) else render_base(id) end end |