ruby function library