translated domain model to ruby syntax