learn04.rb changed

Change in object-oriented style.