def check_conditions!(o, args, conditions)
      conditions.each do |condition|
        o.class.instance_eval do
          define_method(:bound_condition_passes?, &(condition.block))
        end
        begin
          o.bound_condition_passes?(*args)
        rescue MiniTest::Assertion => afe
          throw :contract, AssertionFailed.new(afe.message)
        rescue Exception => e
          throw :contract, e
        end
        o.class.send(:remove_method, :bound_condition_passes?)
      end
    end
def check_conditions!(o, args, conditions)
      conditions.each do |condition|
        o.class.instance_eval do
          define_method(:bound_condition_passes?, &(condition.block))
        end
        begin
          o.bound_condition_passes?(*args)
        rescue MiniTest::Assertion => afe
          throw :contract, AssertionFailed.new(afe.message)
        rescue Exception => e
          throw :contract, e
        end
        o.class.send(:remove_method, :bound_condition_passes?)
      end
    end
Checks the given conditions against the object, passing the given args
 into the block.  Throws :contract if any fail or if an exception is
 raised.  Because of the need to evaluate the condition in the context
 of the object itself, a temporary method called +bound_condition_passes?+
 is defined on the object, using the block associated with the condition.
 TODO Is there a better way to evaluate an arbitary block in a particular binding?  There must be.