Class: SSHKit::Formatter::SimpleText

Inherits:
Pretty show all
Defined in:
lib/sshkit/formatters/simple_text.rb

Constant Summary

Constants inherited from Pretty

Pretty::LEVEL_COLORS, Pretty::LEVEL_NAMES

Instance Attribute Summary

Attributes inherited from Abstract

#options, #original_output

Instance Method Summary collapse

Methods inherited from Pretty

#log_command_data, #log_command_exit, #log_command_start, #write

Methods inherited from Abstract

#<<, #initialize, #log_command_data, #log_command_exit, #log_command_start, #write

Constructor Details

This class inherits a constructor from SSHKit::Formatter::Abstract

Instance Method Details

#colorize(obj, _color, _mode = nil) ⇒ Object

Historically, SimpleText formatter was used to disable coloring, so we maintain that behaviour


8
9
10
# File 'lib/sshkit/formatters/simple_text.rb', line 8

def colorize(obj, _color, _mode=nil)
  obj.to_s
end

#format_message(_verbosity, message, _uuid = nil) ⇒ Object


12
13
14
# File 'lib/sshkit/formatters/simple_text.rb', line 12

def format_message(_verbosity, message, _uuid=nil)
  message
end