I've never caught a rat but I do have plenty of mice here. Every year I try to keep the mice out of my shed and the mower that's in the shed. I've tried almost every type of trap and mothballs and they always end up in my mower and chew up the wires.
The past 2 years I take one of the oil catch pans that you can buy at any auto parts store (on with the open top for catching oil when you open a differential or something like that) and filled it with 1 gallon of antifreeze. If you have animals (cats, dogs, etc) in your house then do NOT do this as it can kill them. The antifreeze is sweet and mice love it. For mice, they get in the antifreeze and cannot climb back out and die. Then I go in with a garden shovel and throw them away. For the past 2 years I've not had a single mouse nest in my mower. I'm not sure if a rat would get stuck in the oil pan, but if it ate the antifreeze it would go off and die. Depending on where he dies, that may be a good or bad thing.