Class: Pytty::Client::Cli::YieldCommand

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

Instance Method Summary collapse

Instance Method Details

#executeObject



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

def execute
  response, json = Async.run do
    Pytty::Client::Api::Yield.run cmd: cmd_list, id: name, env: {}
  end.wait

  if response.status == 200
    process_yield = ::Pytty::Client::ProcessYield.from_json json
    puts process_yield.id
  else
    puts json
  end

end