--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Syntactic sugar for executing a command. Sends a channel request asking that the given command be invoked. If the block is given, it will be called when the server responds. The first parameter will be the channel, and the second will be true or false, indicating whether the request succeeded or not. In this case, success means that the command is being executed, not that it has completed, and failure means that the command altogether failed to be executed.
- !ruby/struct:SM::Flow::VERB 
  body: "  channel.exec &quot;ls -l /home&quot; do |ch, success|\n    if success\n      puts &quot;command has begun executing...&quot;\n      # this is a good place to hang callbacks like #on_data...\n    else\n      puts &quot;alas! the command could not be invoked!&quot;\n    end\n  end\n"
full_name: Net::SSH::Connection::Channel#exec
is_singleton: false
name: exec
params: (command, &block)
visibility: public
