Module: EventMachine::Deferrable
- Included in:
- EMDextras::Chains::JoinedDeferrable
- Defined in:
- lib/em-dextras/extension/object/deferrable.rb
Instance Method Summary collapse
Instance Method Details
#map ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/em-dextras/extension/object/deferrable.rb', line 3 def map deferrable_result = EventMachine::DefaultDeferrable.new self.callback do |original_value| deferrable_result.succeed yield(original_value) end self.errback do |original_value| deferrable_result.fail original_value end deferrable_result end |