Class: Pytty::Client::Cli::SpawnCommand

Inherits:
Clamp::Command
  • Object
show all
Defined in:
lib/pytty/client/cli/spawn_command.rb

Instance Method Summary collapse

Instance Method Details

#executeObject



13
14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/pytty/client/cli/spawn_command.rb', line 13

def execute
  Async.run do
    for id in id_list
      response, body = Pytty::Client::Api::Spawn.run id: id, tty:true, interactive:true
      unless response.status == 200
        puts body
        exit 1
      else
        puts id
      end
    end
  end
end