Module: Is::Async

Overview

public

Makes objects async-aware.

Instance Method Summary collapse

Instance Method Details

#async(&block) ⇒ Object

public

Call behavior asychronously, returning a future.



14
15
16
17
18
19
20
# File 'lib/is/async.rb', line 14

def async(&block)
  if block
    Core::Async::Future.new(&block)
  else
    Core::Async::Wrapper.new(self)
  end
end