Class: Assertion::False
Overview
Instance Method Summary
collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
in the class Assertion::True
Instance Method Details
#assert(assertion, msg = "failed assertion (no message given)") ⇒ Object
103
104
105
|
# File 'lib/quarry/assert.rb', line 103
def assert(assertion, msg="failed assertion (no message given)")
raise Assertion, msg if assertion
end
|
#message(obj, sym, *a, &b) ⇒ Object
107
108
109
110
|
# File 'lib/quarry/assert.rb', line 107
def message( obj, sym, *a, &b )
"NOT #{obj.inspect} #{sym} #{a.collect{|x| x.inspect}.join(',')}"
end
|