Created
April 25, 2013 10:56
-
-
Save 1dolinski/5458966 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def add_listener(listener) | |
| (@listeners ||= [] << listener) | |
| end | |
| add_listener("chris") | |
| @listeners && @listeners.each do |x| # why not just @listeners.each ?? | |
| puts x | |
| end | |
mikebaldry
commented
Apr 25, 2013
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment