Class: URI::SCP

### Home Classes Methods

### In Files

- lib/uri/open-scp.rb
- lib/uri/scp.rb

### Parent

Generic

### Methods

- ::new
- ::new2
- #buffer_open

### Included Modules

- OpenURI::OpenRead

### Files

- README.rdoc

### Class/Module Index

Quicksearch

- Net
- Net::SCP
- Net::SCP::Download
- Net::SCP::Error
- Net::SCP::Upload
- Net::SCP::Version
- Net::SSH
- Net::SSH::Connection
- Net::SSH::Connection::Session
- URI
- URI::SCP

No matching classes.

# URI::SCP

### Constants

COMPONENT
DEFAULT_PORT

### Attributes

options[R]

### Public Class Methods

new(*args) click to toggle source

    # File lib/uri/scp.rb, line 20
    def initialize(*args)
      super(*args)

      @options = Hash.new
      (query || "").split(/&/).each do |pair|
        name, value = pair.split(/=/, 2)
        opt_name = name.to_sym
        values = value.split(/,/).map { |v| v.to_i.to_s == v ? v.to_i : v }
        values = values.first if values.length == 1
        options[opt_name] = values
      end
    end

new2(user, password, host, port, path, query) click to toggle source

    # File lib/uri/scp.rb, line 16
    def self.new2(user, password, host, port, path, query)
      new('scp', [user, password], host, port, nil, path, nil, query)
    end

### Public Instance Methods

buffer_open(buf, proxy, open_options) click to toggle source

    # File lib/uri/open-scp.rb, line 10
    def buffer_open(buf, proxy, open_options)
      options = open_options.merge(:port => port, :password => password)
      progress = options.delete(:progress_proc)
      buf << Net::SCP.download!(host, user, path, nil, options, &progress)
      buf.io.rewind
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.