Method: YARD::Server::LibraryVersion#to_s

Defined in:
lib/yard/server/library_version.rb

#to_s(url_format = true) ⇒ String

Returns the string representation of the library.

Parameters:

  • url_format (Boolean) (defaults to: true)

    if true, returns the string in a URI-compatible format (for appending to a URL). Otherwise, it is given in a more human readable format.

Returns:

  • (String)

    the string representation of the library.

Since:

  • 0.6.0



145
146
147
# File 'lib/yard/server/library_version.rb', line 145

def to_s(url_format = true)
  version ? "#{name}#{url_format ? '/' : '-'}#{version}" : name.to_s
end