ruby to scala