Skip to content

Latest commit

 

History

History
20 lines (14 loc) · 405 Bytes

README.md

File metadata and controls

20 lines (14 loc) · 405 Bytes

assure

Provides two methods: internal_error and assure

internal_error

Raises internal error with a given message.

assure

Raises internal error when expression evaluates to nil or false. Use this to check various preconditions, for example:

def do_smth(x)
    assure(x.is_a? String)
end

You can provide optional message to be printed in the exception output.