Class: ErrorsAndExceptions
- Inherits:
-
Object
- Object
- ErrorsAndExceptions
- Defined in:
- lib/logix-toolkit/core/errors.rb
Overview
This class stores the Errors and exceptions messages
Class Method Summary collapse
-
.couldnt_be_performed ⇒ Object
throws an error if the logical functions couldn’t be performed for any reason.
-
.object_not_boolean(object) ⇒ Object
throws an error if the object from user input is not a boolean.
-
.operation_unavailable_atm ⇒ Object
throws an error if function is currently unavailable.
Class Method Details
.couldnt_be_performed ⇒ Object
throws an error if the logical functions couldn’t be performed for any reason
8 9 10 |
# File 'lib/logix-toolkit/core/errors.rb', line 8 def self.couldnt_be_performed puts "ERROR: Operation could not be performed" end |
.object_not_boolean(object) ⇒ Object
throws an error if the object from user input is not a boolean
4 5 6 |
# File 'lib/logix-toolkit/core/errors.rb', line 4 def self.object_not_boolean object puts "ERROR: Object \"#{object}\" was not recognized as a boolean no logical operations could be performed" end |
.operation_unavailable_atm ⇒ Object
throws an error if function is currently unavailable
12 13 14 |
# File 'lib/logix-toolkit/core/errors.rb', line 12 def self.operation_unavailable_atm puts "Sorry, the current operation is unavailable at the moment" end |