Implement observer pattern in Ruby