public Method

SFTP.start( *args, &block )

A convenience method for starting a standalone SFTP session. It will start up an SSH session using the given arguments (see the documentation for Net::SSH::Session for details), and will then start a new SFTP session with the SSH session. If a block is given, it will be passed to the SFTP session.

Source Code

# File net/sftp.rb, line 27
def start( *args, &block )
  session = Net::SSH.start( *args )
  Net::SFTP::Session.new( session, &block )
ensure
  session.close if session && block_given?
end
Comments

Have your say
Please use Textile formatting (click here for a cheat sheet). Use <code/> and <pre/> for code samples.
Click here to login with OpenID to to post comments.