Class: Pubid::Bipm::Renderer
- Inherits:
-
Renderers::Base
- Object
- Renderers::Base
- Pubid::Bipm::Renderer
- Defined in:
- lib/pubid/bipm/renderer.rb
Overview
Human-readable renderer for the four BIPM identifier families. Registered
as the :human format 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
8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/pubid/bipm/renderer.rb', line 8 def render(context: nil, **_opts) case @id when Identifiers::CommitteeDocument then render_committee(@id) when Identifiers::Meeting then render_meeting(@id) when Identifiers::MetrologiaArticle then render_metrologia(@id) when Identifiers::SiBrochure then render_si_brochure(@id) when Identifiers::Mep then render_mep(@id) when Identifiers::Guide then render_guide(@id) else raise "Cannot render BIPM identifier: #{@id.class}" end end |