Class: SSHKit::Formatter::Abstract
- Inherits:
-
Object
- Object
- SSHKit::Formatter::Abstract
- Extended by:
- Forwardable
- Defined in:
- lib/sshkit/formatters/abstract.rb
Instance Attribute Summary collapse
-
#original_output ⇒ Object
readonly
Returns the value of attribute original_output.
Instance Method Summary collapse
- #<<(obj) ⇒ Object
-
#initialize(output) ⇒ Abstract
constructor
A new instance of Abstract.
- #log_command_data(command, _stream_type, _stream_data) ⇒ Object
- #log_command_exit(command) ⇒ Object
- #log_command_start(command) ⇒ Object
- #write(_obj) ⇒ Object
Constructor Details
Instance Attribute Details
#original_output ⇒ Object (readonly)
Returns the value of attribute original_output.
10 11 12 |
# File 'lib/sshkit/formatters/abstract.rb', line 10 def original_output @original_output end |
Instance Method Details
#<<(obj) ⇒ Object
38 39 40 |
# File 'lib/sshkit/formatters/abstract.rb', line 38 def <<(obj) write(obj) end |
#log_command_data(command, _stream_type, _stream_data) ⇒ Object
30 31 32 |
# File 'lib/sshkit/formatters/abstract.rb', line 30 def log_command_data(command, _stream_type, _stream_data) write(command) end |
#log_command_exit(command) ⇒ Object
34 35 36 |
# File 'lib/sshkit/formatters/abstract.rb', line 34 def log_command_exit(command) write(command) end |
#log_command_start(command) ⇒ Object
26 27 28 |
# File 'lib/sshkit/formatters/abstract.rb', line 26 def log_command_start(command) write(command) end |
#write(_obj) ⇒ Object
42 43 44 |
# File 'lib/sshkit/formatters/abstract.rb', line 42 def write(_obj) raise "Abstract formatter should not be used directly, maybe you want SSHKit::Formatter::BlackHole" end |