Class: Zencoder::CLI::Command::Base
- Inherits:
-
Object
- Object
- Zencoder::CLI::Command::Base
show all
- 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
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 (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
|
.provides(name, commands = {}) ⇒ Object
7
8
9
|
# File 'lib/zencoder-cli/commands/base.rb', line 7
def provides(name, commands={})
Zencoder::CLI::Command.commands.merge!({ name => commands })
end
|