module RaspbergSerialReport
RaspbergSerialReport โ IRC cards for serial / filenamer replies.
Constants
- FILENAMER_SOURCE
- KEYGEN_SOURCE
- TAG
Public Instance Methods
Source
# File lib/raspberg_serial_report.rb, line 33 def format_filenamer(names:, prefix:, start:, ext:) pairs = names.each_with_index.map { |name, idx| "#{idx + 1}. #{name}" } IrcReply.card( tag: TAG, title: "Filename Converter", body_lines: pairs, footer_parts: ["#{prefix}#{start}+ ยท .#{ext}", FILENAMER_SOURCE] ) end
Source
# File lib/raspberg_serial_report.rb, line 14 def format_serial(name:, serial:) IrcReply.card( tag: TAG, title: "Key Generator", body_lines: ["Name โ #{name}", serial.to_s], footer_parts: [KEYGEN_SOURCE] ) end
Source
# File lib/raspberg_serial_report.rb, line 23 def format_verify(name:, valid:) status = valid ? "Serial valid for #{name}." : "Serial does not match #{name}." IrcReply.card( tag: TAG, title: "Key Generator", body_lines: [status], footer_parts: [KEYGEN_SOURCE] ) end