class Net::SFTP::Response

Encapsulates a response from the remote server, to a specific client request. Response objects are passed as parameters to callbacks when you are performing asynchronous operations; when you call Net::SFTP::Request#wait, you can get the corresponding response object via Net::SFTP::Request#response.

sftp.open("/path/to/file") do |response|
  p response.ok?
  p response[:handle]
end

sftp.loop