Exception: AmazingActivist::UnwrapError

Inherits:
Error
  • Object
show all
Defined in:
lib/amazing_activist/unwrap_error.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(failure) ⇒ UnwrapError

Returns a new instance of UnwrapError.

Parameters:



11
12
13
14
15
# File 'lib/amazing_activist/unwrap_error.rb', line 11

def initialize(failure)
  @failure = failure

  super(failure.message)
end

Instance Attribute Details

#failureOutcome::Failure (readonly)

Returns:



8
9
10
# File 'lib/amazing_activist/unwrap_error.rb', line 8

def failure
  @failure
end

Instance Method Details

#causeException?

Returns:

  • (Exception, nil)


18
19
20
# File 'lib/amazing_activist/unwrap_error.rb', line 18

def cause
  @failure.exception || super
end