Exception: AssertionError
- Inherits:
-
RuntimeError
- Object
- RuntimeError
- AssertionError
- Defined in:
- lib/exceptions.rb
Instance Method Summary collapse
-
#initialize(&block) ⇒ AssertionError
constructor
A new instance of AssertionError.
- #message ⇒ Object
Constructor Details
#initialize(&block) ⇒ AssertionError
Returns a new instance of AssertionError.
2 3 4 |
# File 'lib/exceptions.rb', line 2 def initialize(&block) @msg = "Assertion " + block.to_source + " failed" end |
Instance Method Details
#message ⇒ Object
6 7 8 |
# File 'lib/exceptions.rb', line 6 def @msg end |