learning observer pattern in Ruby