Exception: Ubcbooker::Error::NoAvailableRoom
- Inherits:
-
StandardError
- Object
- StandardError
- Ubcbooker::Error::NoAvailableRoom
- Defined in:
- lib/ubcbooker/error.rb
Instance Attribute Summary collapse
-
#message ⇒ Object
readonly
Returns the value of attribute message.
-
#time_range ⇒ Object
readonly
Returns the value of attribute time_range.
Instance Method Summary collapse
-
#initialize(time_range) ⇒ NoAvailableRoom
constructor
A new instance of NoAvailableRoom.
Constructor Details
#initialize(time_range) ⇒ NoAvailableRoom
Returns a new instance of NoAvailableRoom.
62 63 64 65 66 67 68 |
# File 'lib/ubcbooker/error.rb', line 62 def initialize(time_range) @time_range = time_range @message = "Error: No Available Room\n".red << "There are no room available for #{time_range} range\n" << "Please try again with a different time range" super end |
Instance Attribute Details
#message ⇒ Object (readonly)
Returns the value of attribute message.
61 62 63 |
# File 'lib/ubcbooker/error.rb', line 61 def @message end |
#time_range ⇒ Object (readonly)
Returns the value of attribute time_range.
61 62 63 |
# File 'lib/ubcbooker/error.rb', line 61 def time_range @time_range end |