Exception: Otoroshi::AssertionError
- Defined in:
- lib/otoroshi/exceptions.rb
Overview
Manages errors raised when value does not pass the assertion
Instance Method Summary collapse
-
#initialize(property, array: false) ⇒ AssertionError
constructor
Initialize an error.
Constructor Details
#initialize(property, array: false) ⇒ AssertionError
Initialize an error
63 64 65 66 67 68 69 70 71 |
# File 'lib/otoroshi/exceptions.rb', line 63 def initialize(property, array: false) msg = if array ":#{property} contains elements that do not respect the assertion" else ":#{property} does not respect the assertion" end super(msg) end |