Module: Pubid::Rendering::Stage
- Included in:
- Base
- Defined in:
- lib/pubid/rendering/stage.rb
Instance Method Summary collapse
-
#render_stage(stage, type = nil, has_copublisher: false, **_options) ⇒ String
Render stage and type abbreviations.
Instance Method Details
#render_stage(stage, type = nil, has_copublisher: false, **_options) ⇒ String
Render stage and type abbreviations
12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/pubid/rendering/stage.rb', line 12 def render_stage(stage, type = nil, has_copublisher: false, **) result = "" if stage&.abbr separator = has_copublisher ? " " : "/" result += "#{separator}#{stage.abbr}" end if type&.abbr && type.abbr != default_type_abbr result += type_separator(has_copublisher, result) + type.abbr end result end |