switch example to ruby batch notation