class TTY::Command::Printers::Quiet
Attributes
options[R]
output[R]
Public Instance Methods
print_command_err_data(cmd, *args)
click to toggle source
# File lib/tty/command/printers/quiet.rb, line 19 def print_command_err_data(cmd, *args) write(cmd, args.join(' '), err_data) end
print_command_exit(cmd, status, *args)
click to toggle source
# File lib/tty/command/printers/quiet.rb, line 23 def print_command_exit(cmd, status, *args) unless !cmd.only_output_on_error || status.zero? output << out_data output << err_data end # quiet end
print_command_out_data(cmd, *args)
click to toggle source
# File lib/tty/command/printers/quiet.rb, line 15 def print_command_out_data(cmd, *args) write(cmd, args.join(' '), out_data) end
print_command_start(cmd)
click to toggle source
# File lib/tty/command/printers/quiet.rb, line 11 def print_command_start(cmd) # quiet end
write(cmd, message, data = nil)
click to toggle source
# File lib/tty/command/printers/quiet.rb, line 32 def write(cmd, message, data = nil) target = (cmd.only_output_on_error && !data.nil?) ? data : output target << message end