Exception: Ubcbooker::Error::UnsupportedTime
- Inherits:
-
StandardError
- Object
- StandardError
- Ubcbooker::Error::UnsupportedTime
- Defined in:
- lib/ubcbooker/error.rb
Instance Attribute Summary collapse
-
#message ⇒ Object
readonly
Returns the value of attribute message.
-
#time ⇒ Object
readonly
Returns the value of attribute time.
Instance Method Summary collapse
-
#initialize(time = "unknown") ⇒ UnsupportedTime
constructor
A new instance of UnsupportedTime.
Constructor Details
#initialize(time = "unknown") ⇒ UnsupportedTime
Returns a new instance of UnsupportedTime.
29 30 31 32 33 34 35 |
# File 'lib/ubcbooker/error.rb', line 29 def initialize(time = "unknown") @time = time @message = "Error: Unsupported Time\n".red << "Please check if the time is in the format of HH:MM-HH:MM\n" << "Ex. 11:00-13:00" super end |
Instance Attribute Details
#message ⇒ Object (readonly)
Returns the value of attribute message.
28 29 30 |
# File 'lib/ubcbooker/error.rb', line 28 def @message end |
#time ⇒ Object (readonly)
Returns the value of attribute time.
28 29 30 |
# File 'lib/ubcbooker/error.rb', line 28 def time @time end |