Class: Pubid::Gb::Renderer

Inherits:
Renderers::Base show all
Defined in:
lib/pubid/gb/renderer.rb

Overview

Human-readable renderer for Chinese Standard identifiers.

Produces the canonical printed form:

"GB/T 20223-2006"
"GB/T 5606.1-2004"
"GB/T 5606 (all parts)"
"T/GZAEPI 001—2018"     (social-group form, em-dash year)

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

#initialize, render

Constructor Details

This class inherits a constructor from Pubid::Renderers::Base

Instance Method Details

#render(**_opts) ⇒ Object



13
14
15
16
17
# File 'lib/pubid/gb/renderer.rb', line 13

def render(**_opts)
  parts = [publisher_portion, " #{number_portion}"]
  parts << " (all parts)" if @id.all_parts
  parts.join
end