Cats are generally better ratters than dogs. Their natural hunting instinct, small size, and agility make them well suited for catching rats, and their sharp claws and teeth are effective weapons.
Dogs are not as naturally inclined to hunt rats, though some breeds—especially terriers—have been bred specifically for ratting and can be very effective.