Created
July 30, 2010 02:06
-
-
Save mattpodwysocki/499735 to your computer and use it in GitHub Desktop.
This file contains 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
actions = { | |
:on_next => proc {|next_value| puts "Next: #{next_value}" }, | |
:on_error => proc {|exception| puts "Exception: #{exception.message}"}, | |
:on_completed => proc { puts "done!" } | |
} | |
observer = Observer.new actions | |
observable = Observable.range(2,2, Scheduler.new_thread).select_many do |x| | |
Observable.range(x * 3, 3, Scheduler.new_thread) | |
end | |
observable.subscribe(observer) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment