rubymotion-community / BubbleWrap

Cocoa wrappers and helpers for RubyMotion (Ruby for iOS and OS X) - Making Cocoa APIs more Ruby like, one API at a time. Fork away and send your pull requests
Other
1.18k stars 208 forks source link

Add DependentDeferrable #469

Closed hboon closed 9 years ago

hboon commented 9 years ago

From README:

d1 = EM::DefaultDeferrable.new d2 = EM::DefaultDeferrable.new d = EM::DependentDeferrable.on(d1, d2) d.callback {|a, b| puts "a: #{a} b: #{b}"} d1.succeed 'one', 'one more' d2.succeed :two

Prints: a: ["one", "one more"] b: [:two]

markrickert commented 9 years ago

Sweet! Thanks for the contribution!