Class: Net::SSH::Connection::Session

Inherits:
Object
  • Object
show all
Defined in:
lib/net/ssh/shell.rb

Instance Method Summary collapse

Instance Method Details

#shell(*args) {|shell| ... } ⇒ Object

Provides a convenient way to initialize a shell given a Net::SSH session. Yields the new shell if a block is given. Returns the shell instance.

Yields:



185
186
187
188
189
# File 'lib/net/ssh/shell.rb', line 185

def shell(*args)
  shell = Net::SSH::Shell.new(self, *args)
  yield shell if block_given?
  shell
end