Exception: Exception
- Defined in:
- lib/brass.rb
Instance Method Summary collapse
-
#assertion? ⇒ Boolean
Is the exception an assertion error?.
-
#set_assertion(boolean) ⇒ Object
Set the the exception’s assertion flag.
-
#set_message(msg) ⇒ Object
Set message.
Instance Method Details
#assertion? ⇒ Boolean
Is the exception an assertion error?
4 5 6 |
# File 'lib/brass.rb', line 4 def assertion? @assertion end |
#set_assertion(boolean) ⇒ Object
Set the the exception’s assertion flag.
9 10 11 |
# File 'lib/brass.rb', line 9 def set_assertion(boolean) @assertion = boolean # ? true : false end |
#set_message(msg) ⇒ Object
TODO:
Does the message have to be a string?
Set message. (not strictly needed here, but can be useful anyway).
17 18 19 |
# File 'lib/brass.rb', line 17 def (msg) @mesg = msg.to_str end |