Class: Pubid::Renderers::HumanReadable
- Defined in:
- lib/pubid/renderers/human_readable.rb
Direct Known Subclasses
DirectivesRenderer, GuideRenderer, IwaRenderer, SupplementRenderer
Constant Summary
Constants inherited from Base
Base::SEMANTIC_SPLIT, Base::TYPED_STAGE_CSS
Instance Method Summary collapse
-
#render(context:, with_edition: false, **_opts) ⇒ Object
**_optsabsorbs render flags that only some flavors honour (e.g. the IEEE-specific:trademark), so the shared renderer tolerates them.
Methods inherited from Base
Constructor Details
This class inherits a constructor from Pubid::Renderers::Base
Instance Method Details
#render(context:, with_edition: false, **_opts) ⇒ Object
**_opts absorbs render flags that only some flavors honour (e.g. the
IEEE-specific :trademark), so the shared renderer tolerates them.
8 9 10 11 12 13 14 15 16 17 |
# File 'lib/pubid/renderers/human_readable.rb', line 8 def render(context:, with_edition: false, **_opts) parts = [] parts << render_publisher_and_stage(context) parts << render_number_portion(context) parts << render_edition_portion(context) if with_edition result = parts.compact.join(" ") result << render_language_portion(context, with_edition: with_edition) result << " (all parts)" if @id.all_parts result end |