Class: SSHKit::Backend::Printer

Inherits:
Abstract
  • Object
show all
Includes:
CommandHelper
Defined in:
lib/sshkit/backends/printer.rb

Direct Known Subclasses

Netssh

Instance Attribute Summary

Attributes inherited from Abstract

#host

Instance Method Summary collapse

Methods included from CommandHelper

#make, #rake

Methods inherited from Abstract

#as, #background, #initialize, #make, #rake, #test, #with, #within

Constructor Details

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

Instance Method Details

#capture(command, args = []) ⇒ Object



16
17
18
# File 'lib/sshkit/backends/printer.rb', line 16

def capture(command, args=[])
  raise MethodUnavailableError
end

#execute(*args) ⇒ Object



12
13
14
# File 'lib/sshkit/backends/printer.rb', line 12

def execute(*args)
  output << String(command(*args)) + "\n"
end

#runObject



8
9
10
# File 'lib/sshkit/backends/printer.rb', line 8

def run
  instance_exec(host, &@block)
end