ruby code sample