Class: SSHKit::Formatter::Dot

Inherits:
Abstract
  • Object
show all
Defined in:
lib/sshkit/formatters/dot.rb

Instance Attribute Summary

Attributes inherited from Abstract

#original_output

Instance Method Summary collapse

Methods inherited from Abstract

#initialize

Constructor Details

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

Instance Method Details

#write(obj) ⇒ Object Also known as: <<



7
8
9
10
11
12
# File 'lib/sshkit/formatters/dot.rb', line 7

def write(obj)
  return unless obj.is_a? SSHKit::Command
  if obj.finished?
    original_output << (obj.failure? ? c.red('.') : c.green('.'))
  end
end