class CheckerJobs::Notifiers::EmailDefaultFormatter
Public Class Methods
new(check, count, entries)
click to toggle source
# File lib/checker_jobs/notifiers/email_default_formatter.rb, line 4 def initialize(check, count, entries) @check = check @count = count @entries = entries end
Public Instance Methods
body()
click to toggle source
# File lib/checker_jobs/notifiers/email_default_formatter.rb, line 14 def body body = "<p>See more about this email on <a href='#{repository_url}'>Github</a>.</p>" if @entries body += "<p>Found %<class_name>s are: <ul>%<html_ids>s</ul></p>" % { class_name: @entries.first.class.name, html_ids: @entries.map { |entry| "<li>#{format_entry(entry)}</li>" }.join, } end body end
subject()
click to toggle source
# File lib/checker_jobs/notifiers/email_default_formatter.rb, line 10 def subject "#{human_check_name} checker found #{@count} element(s)" end
Private Instance Methods
format_entry(entry)
click to toggle source
Calls superclass method
CheckerJobs::Notifiers::FormatterHelpers#format_entry
# File lib/checker_jobs/notifiers/email_default_formatter.rb, line 27 def format_entry(entry) # NOTE: inherit and override to support your custom objects super end