Class: Plz::ErrorCommand
- Inherits:
-
Object
- Object
- Plz::ErrorCommand
- Defined in:
- lib/plz/error_command.rb
Instance Method Summary collapse
-
#call ⇒ Object
Logs out error reason and usage, then exits with error code 1.
-
#initialize(error) ⇒ ErrorCommand
constructor
A new instance of ErrorCommand.
Constructor Details
#initialize(error) ⇒ ErrorCommand
Returns a new instance of ErrorCommand.
4 5 6 |
# File 'lib/plz/error_command.rb', line 4 def initialize(error) @error = error end |
Instance Method Details
#call ⇒ Object
Logs out error reason and usage, then exits with error code 1
9 10 11 12 |
# File 'lib/plz/error_command.rb', line 9 def call puts "Error: #{@error}" exit(1) end |