Exception: AmazingActivist::UnwrapError

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(failure) ⇒ UnwrapError

Returns a new instance of UnwrapError.

Parameters:



9
10
11
12
13
# File 'lib/amazing_activist/errors/unwrap_error.rb', line 9

def initialize(failure)
  @failure = failure

  super(failure.message)
end

Instance Attribute Details

#failureFailure (readonly)

Returns:



6
7
8
# File 'lib/amazing_activist/errors/unwrap_error.rb', line 6

def failure
  @failure
end

Instance Method Details

#causeException?

Returns:

  • (Exception, nil)


16
17
18
# File 'lib/amazing_activist/errors/unwrap_error.rb', line 16

def cause
  @failure.exception || super
end