module RaspbergBootlogReport
RaspbergBootlogReport — IRC cards for boot log replies.
Constants
- SOURCE
- TAG
Public Instance Methods
Source
# File lib/raspberg_bootlog_report.rb, line 37 def format_cleared IrcReply.card( tag: TAG, title: "Boot Logger", body_lines: ["Boot log cleared."], footer_parts: [SOURCE] ) end
Source
# File lib/raspberg_bootlog_report.rb, line 14 def format_list(entries:) if entries.empty? return IrcReply.card( tag: TAG, title: "Boot Logger", body_lines: ["No boot records logged yet."], footer_parts: [SOURCE] ) end start_num = [entries.length - entries.length, 1].max body_lines = ["No. Date Time"] entries.each_with_index do |entry, idx| body_lines << RaspbergBootlog.format_entry_line(idx + 1, entry) end IrcReply.card( tag: TAG, title: "Boot Logger", body_lines: body_lines, footer_parts: ["#{entries.length} log(s)", SOURCE] ) end