class Proxy::RemoteExecution::Ssh::CommandUpdate

update sent back to the suspended action

Attributes

buffer[R]
exit_status[R]

Public Class Methods

encode_exception(description, exception, fatal = true) click to toggle source
# File lib/smart_proxy_remote_execution_ssh_core/command_update.rb, line 26
def self.encode_exception(description, exception, fatal = true)
  ret = [DebugData.new("#{description}\n#{exception.class} #{exception.message}")]
  ret << StatusData.new('EXCEPTION') if fatal
  return ret
end
new(buffer) click to toggle source
# File lib/smart_proxy_remote_execution_ssh_core/command_update.rb, line 8
def initialize(buffer)
  @buffer = buffer
  extract_exit_status
end

Public Instance Methods

buffer_to_hash() click to toggle source
# File lib/smart_proxy_remote_execution_ssh_core/command_update.rb, line 22
def buffer_to_hash
  buffer.map(&:to_hash)
end
extract_exit_status() click to toggle source
# File lib/smart_proxy_remote_execution_ssh_core/command_update.rb, line 13
def extract_exit_status
  @buffer.delete_if do |data|
    if data.is_a? StatusData
      @exit_status = data.data
      true
    end
  end
end