How do I rotate a mesh object's vertices along an axis with a degree of rotation that increases along a linear gradient? I want to rotate one end of the mesh object (the vertex a with the object's smallest x-coordinate value) 0 degrees around the x-axis, and the other end of the object (the vertex b with the largest x-coordinate) r degrees.

Any other vertex v of this object inbetween the aforementioned two should automatically be rotated around the x-axis by an angle of:

r * (x_v - x_a) / (x_b - x_a)

In other words, the extent of the rotation should be proportional to the position of the vertex on the axis of rotation. What's the most straightforward way to accomplish this?
If you'll accept speed and on-the-fly adjustability in exchange for some precision, then perhaps proportional editing is what you are looking for: