I haven't seen the movie & likely never will, but I get the impression it's supposed to be [possibly to fit a character profile] intentionally 'Heath Robinson'. More complex than it needs to be, whilst being kind of 'fun' in its design rather than purely efficient.
You can catch rats in anything they can't get out of again, so it might theoretically attract them [google says rats like tomatoes] and provide a more-than-necessarily-complex way for them to be able to get in, then a 'greasy pole' to stop them climbing out.
The image, as presented, looks small enough they could probably jump out without needing the pole, even if the access hole was quite small.
You can catch rats in a box-section tube with gently-sprung plexi-glass flaps at each end. If they think they can see right through they will have no hesitation going inside. Place it against a wall/floor junction so they can pass through it as they traverse the room edges and they'll happily open one end to walk in… then discover they can't open either end from the inside. There's no place inside to grip or chew, so they're stuck.
Rats are not stupid though, en masse. If they see a couple of mates get stuck that way, the rest will learn to avoid it.