Module: Resol::ReturnEngine::Catch

Extended by:
Catch
Included in:
Catch
Defined in:
lib/resol/return_engine/catch.rb

Instance Method Summary collapse

Instance Method Details

#handle_return(service, data) ⇒ Object



19
20
21
# File 'lib/resol/return_engine/catch.rb', line 19

def handle_return(service, data)
  throw(service, data)
end

#uncaught_call?(return_obj) ⇒ Boolean

Returns:

  • (Boolean)


15
16
17
# File 'lib/resol/return_engine/catch.rb', line 15

def uncaught_call?(return_obj)
  return_obj == NOT_EXITED
end

#wrap_call(service) ⇒ Object



8
9
10
11
12
13
# File 'lib/resol/return_engine/catch.rb', line 8

def wrap_call(service)
  catch(service) do
    yield
    NOT_EXITED
  end
end