Class: PlainFormatter
- Inherits:
-
SSHKit::Formatter::Abstract
- Object
- SSHKit::Formatter::Abstract
- PlainFormatter
- Defined in:
- lib/docker_deploy.rb
Overview
Improvement on the broken piece of crap text formatter in SSHKit.
Instance Method Summary collapse
-
#initialize(io = $stdout) ⇒ PlainFormatter
constructor
A new instance of PlainFormatter.
- #write(obj) ⇒ Object (also: #<<)
Constructor Details
#initialize(io = $stdout) ⇒ PlainFormatter
Returns a new instance of PlainFormatter.
14 15 16 |
# File 'lib/docker_deploy.rb', line 14 def initialize(io = $stdout) @io = io end |
Instance Method Details
#write(obj) ⇒ Object Also known as: <<
18 19 20 21 22 23 24 |
# File 'lib/docker_deploy.rb', line 18 def write(obj) if obj.is_a?(SSHKit::Command) @io.write(obj.stdout) else @io.write(obj.to_s) end end |