rubyworks / qed

Quality Ensured Documentation

Home Page:http://rubyworks.github.com/qed

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Use any Exception rather than a dedicated Assertion class?

trans opened this issue · comments

Instead of having a dedicated Assertion class, perhaps an attribute can be added to Exception. Then it could be queried, exception.assertion? rather then check type of class. In this way any Exception class can be used as an assertion class.

This was done with the latest release of AE. While the Assertion class still exists, and #assertion? method has been added to the Exception class. And now QED takes advantage of that instead.