Low commit activity in last 3 years
No release in over a year
Return value for async method that is accidentally invoked synchronously
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

 Project Readme

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.