If we look at the ruler to the right, every part of it has a mass. To make tackling questions easier we can assume that all the mass is concentrated in a single point.