summaryrefslogtreecommitdiff
path: root/lib/observer.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/observer.rb')
-rw-r--r--lib/observer.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/observer.rb b/lib/observer.rb
index b802dac..5928367 100644
--- a/lib/observer.rb
+++ b/lib/observer.rb
@@ -30,9 +30,11 @@ module Observable
@observer_state
end
def notify_observers(*arg)
- if @observer_peers and @observer_state
- for i in @observer_peers
- i.update(*arg)
+ if @observer_state
+ if @observer_peers
+ for i in @observer_peers
+ i.update(*arg)
+ end
end
@observer_state = FALSE
end