Last active
October 2, 2017 10:28
-
-
Save Groogy/75d5b5458d14ba689bb740283977bf6c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Foo | |
include CrystalClear | |
def on_contract_fail(contract, condition, method) # some args with info | |
# Default behaviour but you can overide it in this method | |
raise CrystalClear::ContractError.new("Failed #{self.class} #{contract} contract: #{condition}" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment