Module: Pubid::Rendering::Publisher
- Included in:
- Base
- Defined in:
- lib/pubid/rendering/publisher.rb
Instance Method Summary collapse
-
#render_publisher(publisher, copublishers = nil, **options) ⇒ String
Render publisher with optional copublishers.
Instance Method Details
#render_publisher(publisher, copublishers = nil, **options) ⇒ String
Render publisher with optional copublishers
11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/pubid/rendering/publisher.rb', line 11 def render_publisher(publisher, copublishers = nil, **) return "" unless publisher result = publisher.to_s if copublishers&.any? separator = [:copublisher_separator] || "/" result += copublishers.map { |cp| "#{separator}#{cp}" }.join end result end |