Method: App::Terminal.error
- Defined in:
- lib/core/terminal.rb
.error(title = nil, message = nil, exit_script = true, preceding_blank_line = true, error_text = 'Error') ⇒ Object
Displays error and exits script by default.
109 110 111 112 113 114 115 116 117 118 119 120 121 |
# File 'lib/core/terminal.rb', line 109 def self.error(title = nil, = nil, exit_script = true, preceding_blank_line = true, error_text = 'Error') if title.nil? title = "It seems you're trying to do something silly." end if preceding_blank_line puts end puts " \x1B[48;5;196m #{error_text} \x1B[0m \xe2\x86\x92 #{title}" () if exit_script exit end end |