Class: Uma::CLI::ErrorResponse
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(error, argv, env) ⇒ ErrorResponse
constructor
A new instance of ErrorResponse.
- #run ⇒ Object
Methods inherited from Base
Constructor Details
#initialize(error, argv, env) ⇒ ErrorResponse
Returns a new instance of ErrorResponse.
88 89 90 91 92 |
# File 'lib/uma/cli.rb', line 88 def initialize(error, argv, env) @error = error @argv = argv @env = env end |
Instance Method Details
#run ⇒ Object
94 95 96 97 98 99 100 101 102 103 104 |
# File 'lib/uma/cli.rb', line 94 def run error_msg = @error. if error_msg.empty? (env[:io_err], CLI_HELP) else ( env[:io_err], ERROR_RESPONSE_TEMPLATE, error_msg: ) end end |