Skip to content

eventide-project/async-invocation

Repository files navigation

async_invocation

Return value for async method that is accidentally invoked synchronously

Usage

Return the AsyncInvocation::Incorrect from a method that is expected to be called asynchronously and thus is not expected to have a return value.

def some_method
  AsyncInvocation::Incorrect
end

result = some_method

# Any method invoked on the result will raise an error
result.any_method
# => AsyncInvocation::Incorrect::Error (Incorrect invocation of async operation. Intended use is invocation with a block argument. Results should be ignored.)

License

The async_invocation library is released under the MIT License.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •