a linkedlist class in Ruby