Method: Blufin::Terminal.custom

Defined in:
lib/core/terminal.rb

.custom(keyword = 'N/A', color = 1, title = nil, message = nil, preceding_blank_line = true) ⇒ Object

Displays custom message (ideally, keyword should be 7 characters long to match the rest of the output).

Returns:

  • void



227
228
229
230
231
232
# File 'lib/core/terminal.rb', line 227

def self.custom(keyword = 'N/A', color = 1, title = nil, message = nil, preceding_blank_line = true)
    color = 55 if color.nil?
    puts if preceding_blank_line
    puts "  \x1B[38;5;231m\x1B[48;5;#{color}m #{keyword} \x1B[0m #{title.nil? ? '' : "\xe2\x86\x92 "}#{title}\n"
    parse_messages(message)
end