Class: Dry::Effects::Instructions::Raise

Inherits:
Dry::Effects::Instruction show all
Defined in:
lib/dry/effects/instructions/raise.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(error) ⇒ Raise

Returns a new instance of Raise.



9
10
11
12
# File 'lib/dry/effects/instructions/raise.rb', line 9

def initialize(error)
  super()
  @error = error
end

Instance Attribute Details

#errorObject (readonly)

Returns the value of attribute error.



7
8
9
# File 'lib/dry/effects/instructions/raise.rb', line 7

def error
  @error
end

Instance Method Details

#callObject



14
15
16
# File 'lib/dry/effects/instructions/raise.rb', line 14

def call
  raise error
end