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: <<



9
10
11
12
13
14
15
# File 'lib/sshkit/formatters/dot.rb', line 9

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