Mogrify.resize_to_limit

You're seeing just the function resize_to_limit, go back to Mogrify module for more information.
Link to this function

resize_to_limit(image, params)

View Source

Resize the image to fit within the specified dimensions while retaining the original aspect ratio.

Will only resize the image if it is larger than the specified dimensions. The resulting image may be shorter or narrower than specified in the smaller dimension but will not be larger than the specified values.