Method: Net::SSH::Multi::Channel#request_pty

Defined in:
lib/net/ssh/multi/channel.rb

#request_pty(opts = {}, &block) ⇒ Object

Perform a request_pty command on all component channels. The block, if given, is passed to each component channel, so it will (potentially) be invoked once for every channel in the collection. The block will receive two parameters: the specific channel object being operated on, and a boolean indicating whether the pty request succeeded or not.

channel.request_pty do |ch, success|
  # ...
end

See the documentation in Net::SSH for Net::SSH::Connection::Channel#request_pty for more information on how to work with the callback.



95
96
97
98
# File 'lib/net/ssh/multi/channel.rb', line 95

def request_pty(opts={}, &block)
  channels.each { |channel| channel.request_pty(opts, &block) }
  self
end