The key to dealing with rats is to find out where they are coming from in the first place. There will be some access hole somewhere and excluding them is always the best long term option. In the short term some form of trapping or poisoned bait will be necessary to put a stop to the rats that have decided that your attic is a nice place to go.
Traps are generally more effective for mice than they are for rats as rats are far more cautious about anything new in their environment. If its a serious problem you want to sort out quickly my advice would be to use a mixture of bait and traps, take out the trouble makers and then try to proof the area against any others gaining access. Oh yes, make sure you wear gloves when doing any work in the affected area, rats are filthy creatures.