Module: Teckel::Operation::InstanceMethods

Defined in:
lib/teckel/operation.rb

Instance Method Summary collapse

Instance Method Details

#call!(input) ⇒ Object (protected)



277
278
279
280
281
282
283
284
285
# File 'lib/teckel/operation.rb', line 277

def call!(input)
  catch(:failure) do
    out = catch(:success) do
      simple_ret = call(build_input(input))
      build_output(simple_ret)
    end
    return out
  end
end

#fail!(*args) ⇒ Object (protected)



293
294
295
# File 'lib/teckel/operation.rb', line 293

def fail!(*args)
  throw :failure, build_error(*args)
end

#success!(*args) ⇒ Object (protected)



288
289
290
# File 'lib/teckel/operation.rb', line 288

def success!(*args)
  throw :success, build_output(*args)
end