Add tap method for ruby