Class: Pytty::Client::Cli::StderrCommand

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

Instance Method Summary collapse

Instance Method Details

#executeObject



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

def execute
  Async.run do
    response, body = Pytty::Client::Api::Stderr.run id: id
    if response.status == 200
      puts body.read
    else
      puts body.read
      exit 1
    end
  end
end