Class: Pubid::Isbn::Renderer
- Inherits:
-
Renderers::Base
- Object
- Renderers::Base
- Pubid::Isbn::Renderer
- Defined in:
- lib/pubid/isbn/renderer.rb
Overview
Human-readable renderer for ISBN identifiers.
Preserves the original hyphenation when present; otherwise emits the bare digits. Always emits the "ISBN " prefix.
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(**_opts) ⇒ Object
10 11 12 13 |
# File 'lib/pubid/isbn/renderer.rb', line 10 def render(**_opts) body = @id.hyphenated || @id.raw "ISBN #{body}" end |