Class: Assertion::False

Inherits:
True show all
Defined in:
lib/quarry/assert.rb

Overview

Assertion::False

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

Raises:



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 )
  #self.class.message(sym)[@delegate, *a] )
  "NOT #{obj.inspect} #{sym} #{a.collect{|x| x.inspect}.join(',')}"
end