Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow multiple callback regsitering #6

Merged
merged 2 commits into from Apr 24, 2013

Conversation

seadowg
Copy link
Contributor

@seadowg seadowg commented Apr 23, 2013

This allows multiple callbacks to be registered to both Streams and Inject rather than overwriting the last one on each #on_value call.

@@ -3,19 +3,21 @@ class Inject
def initialize(source, start, &blk)
@value = start
@block = blk
@on_value = nil
@callbacks = []
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use array to store callbacks rather than variable

steveklabnik added a commit that referenced this pull request Apr 24, 2013
Allow multiple callback regsitering
@steveklabnik steveklabnik merged commit a071b85 into steveklabnik:master Apr 24, 2013
@steveklabnik
Copy link
Owner

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants