mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
-
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6441 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
f2b75020ba
commit
3289dfc78b
13 changed files with 246 additions and 123 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue