Class: Aric::Command
- Inherits:
-
Object
- Object
- Aric::Command
- Defined in:
- lib/aric/command.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(args = ARGV) ⇒ Command
constructor
A new instance of Command.
Constructor Details
permalink #initialize(args = ARGV) ⇒ Command
Returns a new instance of Command.
9 10 11 |
# File 'lib/aric/command.rb', line 9 def initialize(args = ARGV) @args = args end |
Instance Method Details
permalink #call ⇒ Object
[View source]
13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/aric/command.rb', line 13 def call case when list? puts job_list when play? play else puts run end rescue Aric::Error::JobNameRequired, Aric::Error::JobNotFound, Aric::Error::ScriptExecutionError => e puts "Error: #{e}" end |