summaryrefslogtreecommitdiff
path: root/lib/rexml/parsers/pullparser.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rexml/parsers/pullparser.rb')
-rw-r--r--lib/rexml/parsers/pullparser.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/rexml/parsers/pullparser.rb b/lib/rexml/parsers/pullparser.rb
index aeda6251fe..fe4d41c959 100644
--- a/lib/rexml/parsers/pullparser.rb
+++ b/lib/rexml/parsers/pullparser.rb
@@ -29,8 +29,14 @@ module REXML
def initialize stream
super
@entities = {}
+ @listeners = nil
end
+ def add_listener( listener )
+ @listeners = [] unless @listeners
+ @listeners << listener
+ end
+
def each
while has_next?
yield self.pull