Rehab Loan

I was just wondering how rehab loans are usually set up? If I were rehabbing a house and expected 3 months to finish up. $20,000 purchase price, 20,000 repairs. What kind of loan set up would be best.

Thanks Matt.