Exception: Dry::Monads::UnwrapError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/dry/monads/errors.rb

Overview

An unsuccessful result of extracting a value from a monad.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(receiver) ⇒ UnwrapError

Returns a new instance of UnwrapError.



9
10
11
12
# File 'lib/dry/monads/errors.rb', line 9

def initialize(receiver)
  @receiver = receiver
  super("value! was called on #{receiver.inspect}")
end

Instance Attribute Details

#receiverObject (readonly)



7
8
9
# File 'lib/dry/monads/errors.rb', line 7

def receiver
  @receiver
end