Class: Assertion::False
Instance Method Summary
collapse
Methods inherited from True
message
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
85
86
87
|
# File 'lib/quarry/assertion.rb', line 85
def assert(assertion, msg="failed assertion (no message given)")
raise Assertion, msg if assertion
end
|
#message(obj, sym, *a, &b) ⇒ Object
89
90
91
|
# File 'lib/quarry/assertion.rb', line 89
def message( obj, sym, *a, &b )
"#{obj.inspect} should not #{sym} #{a.collect{|x| x.inspect}.join(',')}"
end
|