ruby: moved append method into linkedlist class