Exception: Yadriggy::Assert::AssertFailure

Inherits:
StandardError
  • Object
show all
Defined in:
lib/yadriggy/assert.rb

Overview

Exception thrown by #assertion.

Instance Method Summary collapse

Constructor Details

#initialize(reason, msg = nil, cause = nil) ⇒ AssertFailure

Returns a new instance of AssertFailure.



155
156
157
158
159
# File 'lib/yadriggy/assert.rb', line 155

def initialize(reason, msg=nil, cause=nil)
  super(msg)
  @reason = reason
  @cause = cause
end

Instance Method Details

#causeStandardError

Gets the cause.

Returns:

  • (StandardError)

    an exception.



163
# File 'lib/yadriggy/assert.rb', line 163

def cause() @cause end

#reasonReason

Gets the reason.

Returns:



167
# File 'lib/yadriggy/assert.rb', line 167

def reason() @reason end