Use lambda instead of function in rake tasks