Class: Zencoder::CLI::Command::Output
- Defined in:
- lib/zencoder-cli/commands/outputs.rb
Class Method Summary collapse
Methods inherited from Base
Methods included from Helpers
#ask, #confirm, #display, #error, #format_date, #home_directory, #running_on_a_mac?, #running_on_windows?, #truncate
Class Method Details
.progress(args, global_options, command_options) ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/zencoder-cli/commands/outputs.rb', line 8 def progress(args, , ) output = Zencoder::Output.progress(args.shift, :base_url => Zencoder.base_url([:environment])).process_for_cli.body rows = [] rows << ["State", output["state"].titleize] if output["state"] == "processing" rows << ["Event", output["current_event"].titleize] rows << ["Progress", output["progress"]] elsif output["state"] == "finished" rows << ["Progress", "100%"] end puts table([{ :value => "Output", :colspan => 2 }], *rows) end |