Adds a basic ruby solution

O(n^2) time cost - needs refactoring