Class: Pubid::Plateau::Renderer
- Inherits:
-
Renderers::Base
- Object
- Renderers::Base
- Pubid::Plateau::Renderer
- Defined in:
- lib/pubid/plateau/renderer.rb
Overview
Human-readable renderer for PLATEAU identifiers.
Produces strings like:
"PLATEAU Technical Report #01"
"PLATEAU Handbook #00 第1.0版"
"PLATEAU Handbook #01-1 Annex A"
The renderer is registered as the ‘:human` format in the PLATEAU 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
15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/pubid/plateau/renderer.rb', line 15 def render(context: nil, **opts) id = @id case id when SupplementIdentifier render_supplement(id) when Identifiers::Handbook render_handbook(id) when Identifiers::TechnicalReport render_technical_report(id) else render_base(id) end end |