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.
51 52 53 54 55 56 57 |
# File 'lib/ubcbooker/error.rb', line 51 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.
50 51 52 |
# File 'lib/ubcbooker/error.rb', line 50 def @message end |
#time_range ⇒ Object (readonly)
Returns the value of attribute time_range.
50 51 52 |
# File 'lib/ubcbooker/error.rb', line 50 def time_range @time_range end |