Class: PlainFormatter

Inherits:
SSHKit::Formatter::Abstract
  • Object
show all
Defined in:
lib/docker_deploy.rb

Overview

Improvement on the broken piece of crap text formatter in SSHKit.

Instance Method Summary collapse

Constructor Details

#initialize(io = $stdout) ⇒ PlainFormatter



26
27
28
# File 'lib/docker_deploy.rb', line 26

def initialize(io = $stdout)
  @io = io
end

Instance Method Details

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



30
31
32
33
34
35
36
# File 'lib/docker_deploy.rb', line 30

def write(obj)
  if obj.is_a?(SSHKit::Command)
    @io.write(obj.full_stdout)
  else
    @io.write(obj.to_s)
  end
end