Method: Packages::UpdateMessagesView#richtext

Defined in:
library/packages/src/lib/packages/update_messages_view.rb

#richtextString

Gets richtext representation of messages passed to constructor

Returns:

  • (String)

    Richtext representation of the list of messages



22
23
24
25
26
27
# File 'library/packages/src/lib/packages/update_messages_view.rb', line 22

def richtext
  text = "<h1>" + _("Packages notifications") + "</h1>\n<p>" \
    + _("You have notifications from the following packages:") + "</p>"
  text << richtext_toc(@messages) if @messages.size > 1
  text << @messages.map { |m| message_to_richtext(m) }.join("<hr>")
end