Exception: Ubcbooker::Error::ProfaneName
- Inherits:
-
StandardError
- Object
- StandardError
- Ubcbooker::Error::ProfaneName
- Defined in:
- lib/ubcbooker/error.rb
Instance Attribute Summary collapse
-
#message ⇒ Object
readonly
Returns the value of attribute message.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(name = "unknown") ⇒ ProfaneName
constructor
A new instance of ProfaneName.
Constructor Details
#initialize(name = "unknown") ⇒ ProfaneName
Returns a new instance of ProfaneName.
51 52 53 54 55 56 57 |
# File 'lib/ubcbooker/error.rb', line 51 def initialize(name = "unknown") @name = name @message = "Error: Name includes profanity\n".red << "Remember that other students might see the booking name\n" << "Please try again with a different name" 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 |
#name ⇒ Object (readonly)
Returns the value of attribute name.
50 51 52 |
# File 'lib/ubcbooker/error.rb', line 50 def name @name end |