Class: Trailblazer::Operation::Railway::Result

Inherits:
Trailblazer::Operation::Result show all
Defined in:
lib/trailblazer/operation/railway.rb

Overview

The Railway::Result knows about its binary state, the context (data), and the last event in the circuit.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Trailblazer::Operation::Result

#failure?, #inspect, #keys, #slice, #success?, #to_hash

Constructor Details

#initialize(success, data, event) ⇒ Result

Operation::Result



16
17
18
19
20
# File 'lib/trailblazer/operation/railway.rb', line 16

def initialize(success, data, event)
  super(success, data)

  @event = event
end

Instance Attribute Details

#eventObject (readonly)

Returns the value of attribute event.



22
23
24
# File 'lib/trailblazer/operation/railway.rb', line 22

def event
  @event
end