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.
40 41 42 43 44 45 46 |
# File 'lib/ubcbooker/error.rb', line 40 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.
39 40 41 |
# File 'lib/ubcbooker/error.rb', line 39 def @message end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
39 40 41 |
# File 'lib/ubcbooker/error.rb', line 39 def name @name end |