Class: Zencoder::CLI::Command::Base
- Inherits:
-
Object
- Object
- Zencoder::CLI::Command::Base
- Extended by:
- Helpers
- Defined in:
- lib/zencoder-cli/commands/base.rb
Class Method Summary collapse
Methods included from Helpers
ask, confirm, display, error, format_date, home_directory, running_on_a_mac?, running_on_windows?, truncate
Class Method Details
.extract_id(args) ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/zencoder-cli/commands/base.rb', line 11 def extract_id(args) arg = args.shift if arg.to_s.strip[/^\d+$/] arg else print "Enter an ID: " id = ask if id.present? id else puts "No ID given. Aborting." exit 1 end end end |