ruby function as paramenter