# File lib/net/ssh/shell.rb, line 27 def open(&callback) if closed? @state = :opening @channel = session.open_channel(&method(:open_succeeded)) @channel.on_open_failed(&method(:open_failed)) @channel.on_request('exit-status', &method(:on_exit_status)) end when_open(&callback) if callback self end