Method: Gitlab::CLI::Helpers.output_table
- Defined in:
- lib/gitlab/cli_helpers.rb
.output_table(cmd, args, data) ⇒ Object
Outputs a nicely formatted table or error message.
97 98 99 100 101 102 103 104 105 106 |
# File 'lib/gitlab/cli_helpers.rb', line 97 def output_table(cmd, args, data) case data when Gitlab::ObjectifiedHash, Gitlab::FileResponse puts record_table([data], cmd, args) when Gitlab::PaginatedResponse puts record_table(data, cmd, args) else # probably just an error message puts data end end |