module FutureProof::Exceptionable

Module Exceptionable provides methods to read values with exceptions.

Private Instance Methods

raise_or_value(value) click to toggle source

Returns value or raises exception if its an exception instance.

# File lib/future_proof/exceptionable.rb, line 9
def raise_or_value(value)
  value.is_a?(StandardError) ? raise(value) : value
end