Simple experiment in FP-style pattern matching with Ruby