aboutsummaryrefslogtreecommitdiffstats
path: root/lib/rexml/parsers/pullparser.rb
diff options
context:
space:
mode:
authorser <ser@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-06-10 02:01:04 +0000
committerser <ser@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-06-10 02:01:04 +0000
commit3289dfc78b4c5051b0079217a193ce50d5349506 (patch)
tree564ff1057a5341fa9b28cf03218851f8d0255f4f /lib/rexml/parsers/pullparser.rb
parentf2b75020ba193b6d20788c800fde583ca8e900d5 (diff)
downloadruby-3289dfc78b4c5051b0079217a193ce50d5349506.tar.gz
-
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6441 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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