class Synco::Shell

A shell provides access to a server, typically to run commands.

Attributes

arguments[R]

Public Class Methods

new(*command, arguments: [], **options) click to toggle source
# File lib/synco/shell.rb, line 26
def initialize(*command, arguments: [], **options)
        @command = command.empty? ? default_command : command
        
        @arguments = arguments
        @options = options
end

Public Instance Methods

connection_command(server, *arguments) click to toggle source

The command required to connect to the remote machine.

# File lib/synco/shell.rb, line 36
def connection_command(server, *arguments)
        [*@command, *@arguments, *arguments, server.host]
end
to_s() click to toggle source
# File lib/synco/shell.rb, line 40
def to_s
        "<#{self.class} #{@command} #{@options.inspect}>"
end