method
add_listener
add_listener( listener )
public
Hide source
# File lib/rexml/parsers/baseparser.rb, line 119 def add_listener( listener ) if !defined?(@listeners) or !@listeners @listeners = [] instance_eval alias :_old_pull :pull def pull event = _old_pull @listeners.each do |listener| listener.receive event end event end end @listeners << listener end