def contract_writer(meth_to_clause)
      attr_writer(*(meth_to_clause.keys))
      meth_to_clause.each do |meth, cls|
        contract "#{meth}=".to_sym, cls => anything
      end
    end
def contract_writer(meth_to_clause)
      attr_writer(*(meth_to_clause.keys))
      meth_to_clause.each do |meth, cls|
        contract "#{meth}=".to_sym, cls => anything
      end
    end
Defines contract-checked attribute writers with the given hash of method
 name to clause.