Class: Pytty::Client::Cli::StatusCommand

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

Instance Method Summary collapse

Instance Method Details

#executeObject



9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/pytty/client/cli/status_command.rb', line 9

def execute
  Async.run do
    for id in id_list do
      response, body = Pytty::Client::Api::Status.run id: id
      if response.status == 200
        puts body
      else
        puts body
        exit 1
      end
    end
  end
end