Class: Dry::Transaction::StepFailure

Inherits:
Object
  • Object
show all
Defined in:
lib/dry/transaction/step_failure.rb

Overview

A wrapper for storing together the step that failed and value describing the failure.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(step, value) ⇒ StepFailure

Returns a new instance of StepFailure.



9
10
11
12
# File 'lib/dry/transaction/step_failure.rb', line 9

def initialize(step, value)
  @step = step
  @value = value
end

Instance Attribute Details

#stepObject (readonly)

Returns the value of attribute step.



6
7
8
# File 'lib/dry/transaction/step_failure.rb', line 6

def step
  @step
end

#valueObject (readonly)

Returns the value of attribute value.



7
8
9
# File 'lib/dry/transaction/step_failure.rb', line 7

def value
  @value
end