More idiomatic ruby for the linked list