Didn't think of that, they could each just be wrapped in a lambda and .call that before the .style_for method.
If you wish to refactor it more I'll leave it to you.