class VerboseShell::ShellError
Attributes
cmd[RW]
exit_code[RW]
output[RW]
Public Class Methods
new(output, cmd, exit_code)
click to toggle source
# File lib/verbose-shell.rb, line 18 def initialize(output, cmd, exit_code) @output = output @cmd = cmd @exit_code = exit_code end
Public Instance Methods
message()
click to toggle source
# File lib/verbose-shell.rb, line 24 def message "\n\n"+(['']*20+@output.split("\n"))[-20..-1].join("\n").lstrip + "\n"+Pastel.new.bright_white.on_red("💩 Command \"#{@cmd[0]}\" returned #{@exit_code}") end
to_s()
click to toggle source
# File lib/verbose-shell.rb, line 27 def to_s; message; end