Method: Quarry::Grammar::Assert#assert
- Defined in:
- lib/quarry/grammar/assert.rb
#assert(test = nil, msg = nil) ⇒ Object
Assert a operational relationship.
4.assert == 3
16 17 18 19 20 21 22 23 |
# File 'lib/quarry/grammar/assert.rb', line 16 def assert(test=nil, msg=nil) if test msg = "failed assertion (no message given)" unless msg raise Assertion.new(msg, caller) unless test else return Expectation.new(self, :backtrace=>caller) end end |