Class: Net::SSH::Simple::Result

Inherits:
Hashie::Dash
  • Object
show all
Defined in:
lib/net/ssh/simple.rb

Overview

Result of a Net::SSH::Simple operation.

Instance Attribute Summary (collapse)

Instance Attribute Details

- (String) cmd

Shell command (ssh) or :upload/:download (scp)

Returns:

  • (String)

    the current value of cmd



722
723
724
# File 'lib/net/ssh/simple.rb', line 722

def cmd
  @cmd
end

- (Exception) exception

Exception that occurred during this operation (if any)

Returns:

  • (Exception)

    the current value of exception



722
723
724
# File 'lib/net/ssh/simple.rb', line 722

def exception
  @exception
end

- (String) exit_code

UNIX exit code (SSH only)

Returns:

  • (String)

    the current value of exit_code



722
723
724
# File 'lib/net/ssh/simple.rb', line 722

def exit_code
  @exit_code
end

- (String) exit_signal

Only present if the remote command terminated due to a signal (SSH only)

Returns:

  • (String)

    the current value of exit_signal



722
723
724
# File 'lib/net/ssh/simple.rb', line 722

def exit_signal
  @exit_signal
end

- (Time) finish_at

Timestamp of operation finish

Returns:

  • (Time)

    the current value of finish_at



722
723
724
# File 'lib/net/ssh/simple.rb', line 722

def finish_at
  @finish_at
end

- (String) host

Hostname/IP address

Returns:

  • (String)

    the current value of host



722
723
724
# File 'lib/net/ssh/simple.rb', line 722

def host
  @host
end

- (Time) last_event_at

Timestamp of last activity

Returns:

  • (Time)

    the current value of last_event_at



722
723
724
# File 'lib/net/ssh/simple.rb', line 722

def last_event_at
  @last_event_at
end

- (Time) last_keepalive_at

Timestamp of last keepalive (if any)

Returns:

  • (Time)

    the current value of last_keepalive_at



722
723
724
# File 'lib/net/ssh/simple.rb', line 722

def last_keepalive_at
  @last_keepalive_at
end

- (Symbol) op

:ssh or :scp

Returns:

  • (Symbol)

    the current value of op



722
723
724
# File 'lib/net/ssh/simple.rb', line 722

def op
  @op
end

- (Hash) opts

The options that the operation was parametrized with

Returns:

  • (Hash)

    the current value of opts



722
723
724
# File 'lib/net/ssh/simple.rb', line 722

def opts
  @opts
end

- (Integer) sent

Number of bytes transferred (SCP only)

Returns:

  • (Integer)

    the current value of sent



722
723
724
# File 'lib/net/ssh/simple.rb', line 722

def sent
  @sent
end

- (Time) start_at

Timestamp of operation start

Returns:

  • (Time)

    the current value of start_at



722
723
724
# File 'lib/net/ssh/simple.rb', line 722

def start_at
  @start_at
end

- (String) stderr

Output captured on stderr (SSH only)

Returns:

  • (String)

    the current value of stderr



722
723
724
# File 'lib/net/ssh/simple.rb', line 722

def stderr
  @stderr
end

- (String) stdout

Output captured on stdout (SSH only)

Returns:

  • (String)

    the current value of stdout



722
723
724
# File 'lib/net/ssh/simple.rb', line 722

def stdout
  @stdout
end

- (boolean) success

Indicates whether the transport-connection was successful

Returns:

  • (boolean)

    the current value of success



722
723
724
# File 'lib/net/ssh/simple.rb', line 722

def success
  @success
end

- (Boolean) timed_out

True if the operation timed out

Returns:

  • (Boolean)

    the current value of timed_out



722
723
724
# File 'lib/net/ssh/simple.rb', line 722

def timed_out
  @timed_out
end

- (Integer) total

Size of requested file (in bytes, SCP only)

Returns:

  • (Integer)

    the current value of total



722
723
724
# File 'lib/net/ssh/simple.rb', line 722

def total
  @total
end