Changed code to ruby syntax.