Class: Switchyard::Result

Inherits:
Object show all
Defined in:
lib/switchyard/functional/result.rb

Class Method Summary collapse

Class Method Details

.try!Object



11
12
13
14
15
# File 'lib/switchyard/functional/result.rb', line 11

def try!
  Success.new(yield)
rescue StandardError => e
  Failure.new(e)
end