added solution for a ruby challenge