Sha256: 48d4e01e6af83f3daf27de94a05ec595277466a1225e4e3529066587e09a5144

Contents?: true

Size: 1.01 KB

Versions: 167

Compression:

Stored size: 1.01 KB

Contents

require 'net/sftp/protocol/01/base'
require 'net/sftp/protocol/02/base'
require 'net/sftp/protocol/03/base'
require 'net/sftp/protocol/04/base'
require 'net/sftp/protocol/05/base'
require 'net/sftp/protocol/06/base'

module Net; module SFTP

  # The Protocol module contains the definitions for all supported SFTP
  # protocol versions.
  module Protocol

    # Instantiates and returns a new protocol driver instance for the given
    # protocol version. +session+ must be a valid SFTP session object, and
    # +version+ must be an integer. If an unsupported version is given,
    # an exception will be raised.
    def self.load(session, version)
      case version
      when 1 then V01::Base.new(session)
      when 2 then V02::Base.new(session)
      when 3 then V03::Base.new(session)
      when 4 then V04::Base.new(session)
      when 5 then V05::Base.new(session)
      when 6 then V06::Base.new(session)
      else raise NotImplementedError, "unsupported SFTP version #{version.inspect}"
      end
    end

  end

end; end

Version data entries

167 entries across 129 versions & 10 rubygems

Version Path
redcar-0.6.1 plugins/project/vendor/net-sftp/lib/net/sftp/protocol.rb
redcar-0.6 plugins/project/vendor/net-sftp/lib/net/sftp/protocol.rb
redcar-0.6.1dev plugins/project/vendor/net-sftp/lib/net/sftp/protocol.rb
redcar-0.5.1 plugins/project/vendor/net-sftp/lib/net/sftp/protocol.rb
redcar-0.5 plugins/project/vendor/net-sftp/lib/net/sftp/protocol.rb
redcar-0.5.6dev plugins/project/vendor/net-sftp/lib/net/sftp/protocol.rb
redcar-0.5.5dev plugins/project/vendor/net-sftp/lib/net/sftp/protocol.rb
redcar-0.5.4dev plugins/project/vendor/net-sftp/lib/net/sftp/protocol.rb
redcar-0.5.3dev plugins/project/vendor/net-sftp/lib/net/sftp/protocol.rb
redcar-0.5.2dev plugins/project/vendor/net-sftp/lib/net/sftp/protocol.rb
redcar-0.5.1dev plugins/project/vendor/net-sftp/lib/net/sftp/protocol.rb
redcar-0.4.1 plugins/project/vendor/net-sftp/lib/net/sftp/protocol.rb
redcar-0.4 plugins/project/vendor/net-sftp/lib/net/sftp/protocol.rb
net-sftp-2.0.5 lib/net/sftp/protocol.rb
redcar-0.3.10.1dev plugins/project/vendor/net-sftp/lib/net/sftp/protocol.rb
redcar-0.3.10.0dev plugins/project/vendor/net-sftp/lib/net/sftp/protocol.rb
redcar-0.3.9 plugins/project/vendor/net-sftp/lib/net/sftp/protocol.rb
redcar-0.3.9.0dev plugins/project/vendor/net-sftp/lib/net/sftp/protocol.rb
redcar-0.3.8.3 plugins/project/vendor/net-sftp/lib/net/sftp/protocol.rb
redcar-0.3.8.2 plugins/project/vendor/net-sftp/lib/net/sftp/protocol.rb