Module: Pubid::Rendering::Format

Included in:
Base
Defined in:
lib/pubid/rendering/format.rb

Instance Method Summary collapse

Instance Method Details

#to_s(format = nil) ⇒ String

Dispatch to appropriate format renderer

Parameters:

  • format (Symbol) (defaults to: nil)

    target format

Returns:

  • (String)

    formatted identifier string



9
10
11
12
# File 'lib/pubid/rendering/format.rb', line 9

def to_s(format = nil)
  effective_format = determine_format(format)
  send(:"to_#{effective_format}_style")
end