Prefer each instead of for in
This commit is contained in:
parent
a921cab621
commit
ec1993c33f
@ -71,9 +71,7 @@ def add_observer(observer)
|
||||
|
||||
# Notify list of observers of a change.
|
||||
def notify_observers(*arg)
|
||||
for observer in observer_instances
|
||||
observer.update(*arg)
|
||||
end
|
||||
observer_instances.each { |observer| observer.update(*arg) }
|
||||
end
|
||||
|
||||
# Total number of observers.
|
||||
|
Loading…
Reference in New Issue
Block a user