multicase ruby code

main code