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



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

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

  @event = event
end

Instance Attribute Details

#eventObject (readonly)

Returns the value of attribute event.



26
27
28
# File 'lib/trailblazer/operation/railway.rb', line 26

def event
  @event
end